@@ -126,7 +126,6 @@ def _make_divisible(v, divisor, min_value=None):
126126
127127def MobileNetV2 (input_shape = None ,
128128 alpha = 1.0 ,
129- depth_multiplier = 1 ,
130129 include_top = True ,
131130 weights = 'imagenet' ,
132131 input_tensor = None ,
@@ -147,15 +146,14 @@ def MobileNetV2(input_shape=None,
147146 do not match then we will throw an error.
148147 E.g. `(160, 160, 3)` would be one valid value.
149148 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.
151151 - If `alpha` < 1.0, proportionally decreases the number
152152 of filters in each layer.
153153 - If `alpha` > 1.0, proportionally increases the number
154154 of filters in each layer.
155155 - If `alpha` = 1, default number of filters from the paper
156156 are used at each layer.
157- depth_multiplier: depth multiplier for depthwise convolution
158- (also called the resolution multiplier)
159157 include_top: whether to include the fully-connected
160158 layer at the top of the network.
161159 weights: one of `None` (random initialization),
@@ -185,8 +183,8 @@ def MobileNetV2(input_shape=None,
185183
186184 # Raises
187185 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'
190188 """
191189 global backend , layers , models , keras_utils
192190 backend , layers , models , keras_utils = get_submodules_from_kwargs (kwargs )
@@ -286,10 +284,6 @@ def MobileNetV2(input_shape=None,
286284 cols = input_shape [col_axis ]
287285
288286 if weights == 'imagenet' :
289- if depth_multiplier != 1 :
290- raise ValueError ('If imagenet weights are being loaded, '
291- 'depth multiplier must be 1' )
292-
293287 if alpha not in [0.35 , 0.50 , 0.75 , 1.0 , 1.3 , 1.4 ]:
294288 raise ValueError ('If imagenet weights are being loaded, '
295289 'alpha can be one of `0.35`, `0.50`, `0.75`, '
0 commit comments