yunjey / pytorch-tutorial

PyTorch Tutorial for Deep Learning Researchers
MIT License
29.79k stars 8.03k forks source link

About Resnet downsample part in github code #153

Open haoyu12S opened 5 years ago

haoyu12S commented 5 years ago

under the official pytorch code is def _make_layer(self, block, planes, blocks, stride=1): downsample = None if stride != 1 or self.inplanes != planes * block.expansion: downsample = nn.Sequential( *conv1x1(self.inplanes, planes block.expansion, stride),* nn.BatchNorm2d(planes block.expansion), )

But if you check the paper https://arxiv.org/abs/1512.03385 the downsample convolution kernel size is 3x3

what is the difference influence the output? Pytorch change the idea or there is the incorrect codes. Thanks