jfzhang95/pytorch-deeplab-xception

Question about ResNet's implementation?

ZhangYuef opened this issue · 1 comments

Thanks for sharing! I have a question here about the ResNet model structure in modeling/backbone/resnet.py hyperlink.

I found the layer4 in ResNet can be built by two methods and those two methods will be different on conv2d's dilation and padding parameters. I am wondering which one is better to use.

 self.layer4 = self._make_MG_unit(block, 512, blocks=blocks, stride=strides[3], dilation=dilations[3], BatchNorm=BatchNorm)
  # self.layer4 = self._make_layer(block, 512, layers[3], stride=strides[3], dilation=dilations[3], BatchNorm=BatchNorm)

It seems the author thinks the first one is better. Could any one help me to figure out why?

Thanks in advance.

It has something to do with section 3.2.1 in the original paper, MG I suspect stands for Multi-grid. However, it seems a bit different from the original as the paper mentions 7 blocks and this has 4 blocks(layers) only. So I don't fully understand.