I rebuilt resnet101 code:
self.layer3 = self._make_layer(block, norm_layer, 256, layers[2],
inplace, stride=1,
bn_eps=bn_eps, bn_momentum=bn_momentum)
self.layer4 = self._make_layer(block, norm_layer, 512, layers[3],
inplace, stride=1,
bn_eps=bn_eps, bn_momentum=bn_momentum)
pytorch code:
self.layer3 = self._make_layer(block, planes[2], layers[2], stride=2, groups=groups,
norm_layer=norm_layer)
self.layer4 = self._make_layer(block, planes[3], layers[3], stride=2, groups=groups,
norm_layer=norm_layer)
note : my code stride = 1, I want to downsample the input image by 1/8,or set dilation = 3 in nn.conv2d(). Can I still use pretrained weight?
thanks!!!