|
1 | 1 | import cai.layers
|
2 | 2 | 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 |
7 | 7 | from tensorflow.keras.models import Model
|
8 | 8 | from tensorflow.keras.models import model_from_json
|
9 | 9 | import numpy as np
|
@@ -118,7 +118,7 @@ def conv2d_bn(x,
|
118 | 118 | def two_path_inception_v3(
|
119 | 119 | include_top=True,
|
120 | 120 | weights=None, #'two_paths_plant_leafs'
|
121 |
| - input_shape=None, |
| 121 | + input_shape=(224,224,3), |
122 | 122 | pooling=None,
|
123 | 123 | classes=1000,
|
124 | 124 | two_paths_partial_first_block=0,
|
@@ -175,15 +175,6 @@ def two_path_inception_v3(
|
175 | 175 | ValueError: in case of invalid argument for `weights`,
|
176 | 176 | or invalid input shape.
|
177 | 177 | """
|
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 |
| - |
187 | 178 | img_input = keras.layers.Input(shape=input_shape)
|
188 | 179 |
|
189 | 180 | if keras.backend.image_data_format() == 'channels_first':
|
|
0 commit comments