From da06cc61d4081925dea57864e73926aab405cfaa Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Thu, 23 Sep 2021 15:43:22 -0700 Subject: [PATCH] ResNetV2 seems to work best without zero_init residual --- timm/models/resnetv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm/models/resnetv2.py b/timm/models/resnetv2.py index 2ff4da8c..2b5121a2 100644 --- a/timm/models/resnetv2.py +++ b/timm/models/resnetv2.py @@ -344,7 +344,7 @@ class ResNetV2(nn.Module): num_classes=1000, in_chans=3, global_pool='avg', output_stride=32, width_factor=1, stem_chs=64, stem_type='', avg_down=False, preact=True, act_layer=nn.ReLU, conv_layer=StdConv2d, norm_layer=partial(GroupNormAct, num_groups=32), - drop_rate=0., drop_path_rate=0., zero_init_last=True): + drop_rate=0., drop_path_rate=0., zero_init_last=False): super().__init__() self.num_classes = num_classes self.drop_rate = drop_rate