@@ -58,15 +58,18 @@ def _cfg(url='', **kwargs):
5858 'resnet101' : _cfg (url = '' , interpolation = 'bicubic' ),
5959 'resnet101d' : _cfg (
6060 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet101d_ra2-2803ffab.pth' ,
61- interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 256 , 256 ), crop_pct = 0.94 ),
61+ interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 256 , 256 ), crop_pct = 0.94 , pool_size = ( 8 , 8 ) ),
6262 'resnet152' : _cfg (url = '' , interpolation = 'bicubic' ),
6363 'resnet152d' : _cfg (
6464 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet152d_ra2-5cac0439.pth' ,
65- interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 256 , 256 ), crop_pct = 0.94 ),
65+ interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 256 , 256 ), crop_pct = 0.94 , pool_size = ( 8 , 8 ) ),
6666 'resnet200' : _cfg (url = '' , interpolation = 'bicubic' ),
6767 'resnet200d' : _cfg (
6868 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet200d_ra2-bdba9bf9.pth' ,
69- interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 256 , 256 ), crop_pct = 0.94 ),
69+ interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 256 , 256 ), crop_pct = 0.94 , pool_size = (8 , 8 )),
70+ 'resnet200d_320' : _cfg (
71+ url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet200d_ra2-bdba9bf9.pth' ,
72+ interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 320 , 320 ), crop_pct = 1.0 , pool_size = (10 , 10 )),
7073 'tv_resnet34' : _cfg (url = 'https://download.pytorch.org/models/resnet34-333f7ec4.pth' ),
7174 'tv_resnet50' : _cfg (url = 'https://download.pytorch.org/models/resnet50-19c8e357.pth' ),
7275 'tv_resnet101' : _cfg (url = 'https://download.pytorch.org/models/resnet101-5d3b4d8f.pth' ),
@@ -149,7 +152,7 @@ def _cfg(url='', **kwargs):
149152 interpolation = 'bicubic' ),
150153 'seresnet152d' : _cfg (
151154 url = '' ,
152- interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 256 , 256 ), crop_pct = 0.94 ),
155+ interpolation = 'bicubic' , first_conv = 'conv1.0' , input_size = (3 , 256 , 256 ), crop_pct = 0.94 , pool_size = ( 8 , 8 ) ),
153156
154157 # Squeeze-Excitation ResNeXts, to eventually replace the models in senet.py
155158 'seresnext26_32x4d' : _cfg (
@@ -741,6 +744,15 @@ def resnet200d(pretrained=False, **kwargs):
741744 return _create_resnet ('resnet200d' , pretrained , ** model_args )
742745
743746
747+ @register_model
748+ def resnet200d_320 (pretrained = False , ** kwargs ):
749+ """Constructs a ResNet-200-D model. NOTE: Duplicate of 200D above w/ diff default cfg for 320x320.
750+ """
751+ model_args = dict (
752+ block = Bottleneck , layers = [3 , 24 , 36 , 3 ], stem_width = 32 , stem_type = 'deep' , avg_down = True , ** kwargs )
753+ return _create_resnet ('resnet200d_320' , pretrained , ** model_args )
754+
755+
744756@register_model
745757def tv_resnet34 (pretrained = False , ** kwargs ):
746758 """Constructs a ResNet-34 model with original Torchvision weights.
0 commit comments