Fix first_conv for mobileone and fastvit

This commit is contained in:
Ross Wightman 2023-08-23 20:59:29 -07:00 committed by Ross Wightman
parent 16334e4bec
commit d6c348765a
2 changed files with 6 additions and 1 deletions

View File

@ -1919,22 +1919,27 @@ default_cfgs = generate_default_cfgs({
'mobileone_s0.apple_in1k': _cfg(
hf_hub_id='timm/',
crop_pct=0.875,
first_conv=('stem.conv_kxk.0.conv', 'stem.conv_scale.conv'),
),
'mobileone_s1.apple_in1k': _cfg(
hf_hub_id='timm/',
crop_pct=0.9,
first_conv=('stem.conv_kxk.0.conv', 'stem.conv_scale.conv'),
),
'mobileone_s2.apple_in1k': _cfg(
hf_hub_id='timm/',
crop_pct=0.9,
first_conv=('stem.conv_kxk.0.conv', 'stem.conv_scale.conv'),
),
'mobileone_s3.apple_in1k': _cfg(
hf_hub_id='timm/',
crop_pct=0.9,
first_conv=('stem.conv_kxk.0.conv', 'stem.conv_scale.conv'),
),
'mobileone_s4.apple_in1k': _cfg(
hf_hub_id='timm/',
crop_pct=0.9,
first_conv=('stem.conv_kxk.0.conv', 'stem.conv_scale.conv'),
),
})

View File

@ -1264,7 +1264,7 @@ def _cfg(url="", **kwargs):
"interpolation": "bicubic",
"mean": IMAGENET_DEFAULT_MEAN,
"std": IMAGENET_DEFAULT_STD,
'first_conv': 'stem.0.conv_kxk.0.conv',
'first_conv': ('stem.0.conv_kxk.0.conv', 'stem.0.conv_scale.conv'),
"classifier": "head.fc",
**kwargs,
}