Skip to content

Commit 4ff7c25

Browse files
committed
Pass layer_scale_init_value to Mnv3Features module
1 parent a12b72b commit 4ff7c25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

timm/models/mobilenetv3.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __init__(
8080
round_chs_fn: Callable to round number of filters based on depth multiplier.
8181
drop_rate: Dropout rate.
8282
drop_path_rate: Stochastic depth rate.
83-
layer_scale_init_value: Enable layer scale on compatible blocks if not None
83+
layer_scale_init_value: Enable layer scale on compatible blocks if not None.
8484
global_pool: Type of pooling to use for global pooling features of the FC head.
8585
"""
8686
super(MobileNetV3, self).__init__()
@@ -294,6 +294,7 @@ def __init__(
294294
se_layer: Optional[LayerType] = None,
295295
drop_rate: float = 0.,
296296
drop_path_rate: float = 0.,
297+
layer_scale_init_value: Optional[float] = None,
297298
):
298299
"""
299300
Args:
@@ -312,6 +313,7 @@ def __init__(
312313
se_layer: Type of Squeeze-and-Excite layer.
313314
drop_rate: Dropout rate.
314315
drop_path_rate: Stochastic depth rate.
316+
layer_scale_init_value: Enable layer scale on compatible blocks if not None.
315317
"""
316318
super(MobileNetV3Features, self).__init__()
317319
act_layer = act_layer or nn.ReLU
@@ -337,6 +339,7 @@ def __init__(
337339
norm_layer=norm_layer,
338340
se_layer=se_layer,
339341
drop_path_rate=drop_path_rate,
342+
layer_scale_init_value=layer_scale_init_value,
340343
feature_location=feature_location,
341344
)
342345
self.blocks = nn.Sequential(*builder(stem_size, block_args))

0 commit comments

Comments
 (0)