From 3b57490a630f1dae6fb069be172b503c50070d75 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Sun, 7 Feb 2021 22:09:25 -0800 Subject: [PATCH] Fix some half removed resnet model defs, pooling for ecaresnet269d --- timm/models/resnet.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/timm/models/resnet.py b/timm/models/resnet.py index 6a28c454..6dec9d53 100644 --- a/timm/models/resnet.py +++ b/timm/models/resnet.py @@ -217,7 +217,7 @@ default_cfgs = { interpolation='bicubic', first_conv='conv1.0', input_size=(3, 256, 256), crop_pct=0.94, pool_size=(8, 8)), 'ecaresnet269d': _cfg( url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/ecaresnet269d_320_ra2-7baa55cb.pth', - interpolation='bicubic', first_conv='conv1.0', input_size=(3, 320, 320), pool_size=(8, 8), + interpolation='bicubic', first_conv='conv1.0', input_size=(3, 320, 320), pool_size=(10, 10), crop_pct=1.0, test_input_size=(3, 352, 352)), # Efficient Channel Attention ResNeXts @@ -1029,14 +1029,6 @@ def swsl_resnext101_32x16d(pretrained=True, **kwargs): return _create_resnet('swsl_resnext101_32x16d', pretrained, **model_args) -@register_model -def ecaresnet18(pretrained=False, **kwargs): - """ Constructs an ECA-ResNet-18 model. - """ - model_args = dict(block=BasicBlock, layers=[2, 2, 2, 2], block_args=dict(attn_layer='eca'), **kwargs) - return _create_resnet('ecaresnet18', pretrained, **model_args) - - @register_model def ecaresnet26t(pretrained=False, **kwargs): """Constructs an ECA-ResNeXt-26-T model. @@ -1049,14 +1041,6 @@ def ecaresnet26t(pretrained=False, **kwargs): return _create_resnet('ecaresnet26t', pretrained, **model_args) -@register_model -def ecaresnet50(pretrained=False, **kwargs): - """Constructs an ECA-ResNet-50 model. - """ - model_args = dict(block=Bottleneck, layers=[3, 4, 6, 3], block_args=dict(attn_layer='eca'), **kwargs) - return _create_resnet('ecaresnet50', pretrained, **model_args) - - @register_model def ecaresnet50d(pretrained=False, **kwargs): """Constructs a ResNet-50-D model with eca.