Res2Net/Res2Net-PretrainedModels

What is the difference between stype='normal' and stype='stage'

ShoupingShan opened this issue · 4 comments

What is the difference between stype='normal' and stype='stage' in the Bottleneck

gasvn commented

Block with stage means that the block is a down-sample block, where hierarchical connections are removed. There are only 4 blocks in a net that is stage block.

Thanks, I got it.

@gasvn : You say

There are only 3 blocks in a net that is stage block

However, according to

layers.append(block(self.inplanes, planes, stride, downsample=downsample,
, the first block in every stage has stype='stage', so there are 4 blocks in total, or?

gasvn commented

@gasvn : You say

There are only 3 blocks in a net that is stage block

However, according to

layers.append(block(self.inplanes, planes, stride, downsample=downsample,

, the first block in every stage has stype='stage', so there are 4 blocks in total, or?

This is a common design in resnet series. Resnet50 has [3, 4, 6, 3] blocks in stages. The overall network structure (channel number, stage number, block number in each stage) is mostly based on the resnet structure. The hierarchical residual-like connections in Res2Net require the input and output features to have the same resolution. So when facing the downsampling, we remove the hierarchical connections in Res2Net block. For res2net, strictly, [2,3,5,2] res2net blocks are used in stages. Thanks for your reminder, I have corrected my response. Acctually the first stage block can be a res2net block, but in our implementation, we just do so. The performance difference is limited when there is one more or less res2net block.