Skip to content

Commit d2363eb

Browse files
Porting code to TF2.2.0.
1 parent 6cac2b2 commit d2363eb

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

cai/models.py

+5-14
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import cai.layers
22
from tensorflow import keras
3-
import tensorflow.keras.backend
4-
import tensorflow.keras.layers
5-
import tensorflow.keras.utils
6-
from tensorflow.keras_applications.imagenet_utils import _obtain_input_shape
3+
#import tensorflow.keras.backend
4+
#import tensorflow.keras.layers
5+
#import tensorflow.keras.utils
6+
#from tensorflow.keras.applications.imagenet_utils import _obtain_input_shape
77
from tensorflow.keras.models import Model
88
from tensorflow.keras.models import model_from_json
99
import numpy as np
@@ -118,7 +118,7 @@ def conv2d_bn(x,
118118
def two_path_inception_v3(
119119
include_top=True,
120120
weights=None, #'two_paths_plant_leafs'
121-
input_shape=None,
121+
input_shape=(224,224,3),
122122
pooling=None,
123123
classes=1000,
124124
two_paths_partial_first_block=0,
@@ -175,15 +175,6 @@ def two_path_inception_v3(
175175
ValueError: in case of invalid argument for `weights`,
176176
or invalid input shape.
177177
"""
178-
# Determine proper input shape
179-
input_shape = _obtain_input_shape(
180-
input_shape,
181-
default_size=224,
182-
min_size=75,
183-
data_format=keras.backend.image_data_format(),
184-
require_flatten=include_top,
185-
weights=weights)
186-
187178
img_input = keras.layers.Input(shape=input_shape)
188179

189180
if keras.backend.image_data_format() == 'channels_first':

0 commit comments

Comments
 (0)