From f0e65e37b7e810beb8ff7af617e81ba8604292d8 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Sat, 30 Jan 2021 23:26:19 -0800 Subject: [PATCH] Fix NF-ResNet101 model defs --- timm/models/nfnet.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/timm/models/nfnet.py b/timm/models/nfnet.py index 4e5253a9..74c4fe33 100644 --- a/timm/models/nfnet.py +++ b/timm/models/nfnet.py @@ -97,7 +97,7 @@ model_cfgs = dict( stem_type='7x7_pool', stem_chs=64, width_factor=1.0, bottle_ratio=0.25, efficient=False, group_size=None, act_layer='relu', attn_layer=None), nf_resnet101=NfCfg( - depths=(3, 4, 6, 3), channels=(256, 512, 1024, 2048), + depths=(3, 4, 23, 3), channels=(256, 512, 1024, 2048), stem_type='7x7_pool', stem_chs=64, width_factor=1.0, bottle_ratio=0.25, efficient=False, group_size=None, act_layer='relu', attn_layer=None), @@ -111,7 +111,7 @@ model_cfgs = dict( stem_type='7x7_pool', stem_chs=64, width_factor=1.0, bottle_ratio=0.25, efficient=False, group_size=None, act_layer='relu', attn_layer='se', attn_kwargs=dict(reduction_ratio=0.25)), nf_seresnet101=NfCfg( - depths=(3, 4, 6, 3), channels=(256, 512, 1024, 2048), + depths=(3, 4, 23, 3), channels=(256, 512, 1024, 2048), stem_type='7x7_pool', stem_chs=64, width_factor=1.0, bottle_ratio=0.25, efficient=False, group_size=None, act_layer='relu', attn_layer='se', attn_kwargs=dict(reduction_ratio=0.25)), @@ -125,7 +125,7 @@ model_cfgs = dict( stem_type='7x7_pool', stem_chs=64, width_factor=1.0, bottle_ratio=0.25, efficient=False, group_size=None, act_layer='relu', attn_layer='eca', attn_kwargs=dict()), nf_ecaresnet101=NfCfg( - depths=(3, 4, 6, 3), channels=(256, 512, 1024, 2048), + depths=(3, 4, 23, 3), channels=(256, 512, 1024, 2048), stem_type='7x7_pool', stem_chs=64, width_factor=1.0, bottle_ratio=0.25, efficient=False, group_size=None, act_layer='relu', attn_layer='eca', attn_kwargs=dict()), @@ -439,6 +439,11 @@ def nf_resnet50(pretrained=False, **kwargs): return _create_normfreenet('nf_resnet50', pretrained=pretrained, **kwargs) +@register_model +def nf_resnet101(pretrained=False, **kwargs): + return _create_normfreenet('nf_resnet101', pretrained=pretrained, **kwargs) + + @register_model def nf_seresnet26(pretrained=False, **kwargs): return _create_normfreenet('nf_seresnet26', pretrained=pretrained, **kwargs) @@ -449,6 +454,11 @@ def nf_seresnet50(pretrained=False, **kwargs): return _create_normfreenet('nf_seresnet50', pretrained=pretrained, **kwargs) +@register_model +def nf_seresnet101(pretrained=False, **kwargs): + return _create_normfreenet('nf_seresnet101', pretrained=pretrained, **kwargs) + + @register_model def nf_ecaresnet26(pretrained=False, **kwargs): return _create_normfreenet('nf_ecaresnet26', pretrained=pretrained, **kwargs) @@ -457,3 +467,7 @@ def nf_ecaresnet26(pretrained=False, **kwargs): @register_model def nf_ecaresnet50(pretrained=False, **kwargs): return _create_normfreenet('nf_ecaresnet50', pretrained=pretrained, **kwargs) + +@register_model +def nf_ecaresnet101(pretrained=False, **kwargs): + return _create_normfreenet('nf_ecaresnet101', pretrained=pretrained, **kwargs) \ No newline at end of file