Res2Net / Res2Net-PretrainedModels

(ImageNet pretrained models) The official pytorch implemention of the TPAMI paper "Res2Net: A New Multi-scale Backbone Architecture"
https://mmcheng.net/res2net/
1.07k stars 215 forks source link

对于每一个layer的第一个block,计算方式不是层级的,和论文中描述有差别 #73

Open easy2star opened 1 year ago

easy2star commented 1 year ago

第一个block计算方式

gasvn commented 1 year ago

没有经过层级处理的block放在最开始(论文中)或者最后(代码实现)是等效的。x4只有在downsample的时候才需要pooling

easy2star commented 1 year ago

但是代码中实现的是  第一个block的x4经过pooling,其他都不经过pooling.

---原始邮件--- 发件人: "Shanghua @.> 发送时间: 2023年5月8日(周一) 上午10:29 收件人: @.>; 抄送: @.**@.>; 主题: Re: [Res2Net/Res2Net-PretrainedModels] 对于每一个layer的第一个block,计算方式不是层级的,和论文中描述有差别 (Issue #73)

没有经过层级处理的block放在最开始(论文中)或者最后(代码实现)是等效的。x4只有在downsample的时候才需要pooling

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

mingjie-zheng commented 9 months ago

@easy2star 你不看layer1的话,就明白了。layer2, layer3, layer4的第一个block里面,x1,x2,x3进行conv3x3的时候,stride=2(为了把size变小),也就是说 y_{i-1} 和 x_i 的size并不匹配,自然做不了concat。然后对于x4,为了保证最后y1, y2, y3, y4能concat,x4就只能做pooling来reduce size。 严格点的写法就是把layer1的block1独立出来,不跟着layer2-4那样写。比如改成:if i==0 or (self.stype=='stage' and self.stride==2)。