Skip to content

Commit 136440d

Browse files
committed
Switch to 'same' padding emulation for the enc model as it should be closer for original weights.
1 parent ddd3f99 commit 136440d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

timm/models/mobilenetv5.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,14 @@ def _cfg(url: str = '', **kwargs):
803803
@register_model
804804
def mobilenetv5_300m_enc(pretrained: bool = False, **kwargs) -> MobileNetV5Encoder:
805805
"""MobileNet V5 Vision Encoder"""
806-
model = _gen_mobilenet_v5('mobilenetv5_300m_enc', pretrained=pretrained, encoder=True, **kwargs)
806+
pad_type = kwargs.pop('pad_type', 'same')
807+
model = _gen_mobilenet_v5(
808+
'mobilenetv5_300m_enc',
809+
pretrained=pretrained,
810+
encoder=True,
811+
pad_type=pad_type,
812+
**kwargs,
813+
)
807814
return model
808815

809816

0 commit comments

Comments
 (0)