@@ -126,7 +126,6 @@ def _make_divisible(v, divisor, min_value=None):
126
126
127
127
def MobileNetV2 (input_shape = None ,
128
128
alpha = 1.0 ,
129
- depth_multiplier = 1 ,
130
129
include_top = True ,
131
130
weights = 'imagenet' ,
132
131
input_tensor = None ,
@@ -147,15 +146,14 @@ def MobileNetV2(input_shape=None,
147
146
do not match then we will throw an error.
148
147
E.g. `(160, 160, 3)` would be one valid value.
149
148
alpha: controls the width of the network. This is known as the
150
- width multiplier in the MobileNetV2 paper.
149
+ width multiplier in the MobileNetV2 paper, but the name is kept for
150
+ consistency with MobileNetV1 in Keras.
151
151
- If `alpha` < 1.0, proportionally decreases the number
152
152
of filters in each layer.
153
153
- If `alpha` > 1.0, proportionally increases the number
154
154
of filters in each layer.
155
155
- If `alpha` = 1, default number of filters from the paper
156
156
are used at each layer.
157
- depth_multiplier: depth multiplier for depthwise convolution
158
- (also called the resolution multiplier)
159
157
include_top: whether to include the fully-connected
160
158
layer at the top of the network.
161
159
weights: one of `None` (random initialization),
@@ -185,8 +183,8 @@ def MobileNetV2(input_shape=None,
185
183
186
184
# Raises
187
185
ValueError: in case of invalid argument for `weights`,
188
- or invalid input shape or invalid depth_multiplier, alpha,
189
- rows when weights='imagenet'
186
+ or invalid input shape or invalid alpha, rows when
187
+ weights='imagenet'
190
188
"""
191
189
global backend , layers , models , keras_utils
192
190
backend , layers , models , keras_utils = get_submodules_from_kwargs (kwargs )
@@ -286,10 +284,6 @@ def MobileNetV2(input_shape=None,
286
284
cols = input_shape [col_axis ]
287
285
288
286
if weights == 'imagenet' :
289
- if depth_multiplier != 1 :
290
- raise ValueError ('If imagenet weights are being loaded, '
291
- 'depth multiplier must be 1' )
292
-
293
287
if alpha not in [0.35 , 0.50 , 0.75 , 1.0 , 1.3 , 1.4 ]:
294
288
raise ValueError ('If imagenet weights are being loaded, '
295
289
'alpha can be one of `0.35`, `0.50`, `0.75`, '
0 commit comments