From cc9bedf373209664854dc400cbe5801e3fc1e6e9 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Sun, 3 Oct 2021 17:32:02 -0700 Subject: [PATCH] Add initial ResNet Strikes Back weights for ResNet50 and ResNetV2-50 models --- timm/models/resnet.py | 4 ++-- timm/models/resnetv2.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/timm/models/resnet.py b/timm/models/resnet.py index dad42f38..1f0716c5 100644 --- a/timm/models/resnet.py +++ b/timm/models/resnet.py @@ -53,11 +53,11 @@ default_cfgs = { url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-attn-weights/resnet26t_256_ra2-6f6fa748.pth', interpolation='bicubic', first_conv='conv1.0', input_size=(3, 256, 256), pool_size=(8, 8)), 'resnet50': _cfg( - url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet50_ram-a26f946b.pth', + url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-00ca2c6a.pth', interpolation='bicubic'), 'resnet50d': _cfg( url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/resnet50d_ra2-464e36ba.pth', - interpolation='bicubic', first_conv='conv1.0'), + interpolation='bicubic', first_conv='conv1.0', crop_pct=0.95), 'resnet50t': _cfg( url='', interpolation='bicubic', first_conv='conv1.0'), diff --git a/timm/models/resnetv2.py b/timm/models/resnetv2.py index 2b5121a2..fe7fc466 100644 --- a/timm/models/resnetv2.py +++ b/timm/models/resnetv2.py @@ -105,7 +105,8 @@ default_cfgs = { input_size=(3, 384, 384), pool_size=(12, 12), crop_pct=1.0, interpolation='bicubic'), 'resnetv2_50': _cfg( - interpolation='bicubic'), + url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnetv2_50_a1_h-000cdf49.pth', + interpolation='bicubic', crop_pct=0.95), 'resnetv2_50d': _cfg( interpolation='bicubic', first_conv='stem.conv1'), 'resnetv2_50t': _cfg(