diff --git a/mmdet/models/backbones/resnet.py b/mmdet/models/backbones/resnet.py index 3a8a6131a7b02e52337ca972efb82a3d96b53b5b..abe128030690f900eb78a6b2406aab03d0de0dc4 100644 --- a/mmdet/models/backbones/resnet.py +++ b/mmdet/models/backbones/resnet.py @@ -297,11 +297,11 @@ def make_res_layer(block, layers = [] layers.append( block( - inplanes, - planes, - stride, - dilation, - downsample, + inplanes=inplanes, + planes=planes, + stride=stride, + dilation=dilation, + downsample=downsample, style=style, with_cp=with_cp, conv_cfg=conv_cfg, @@ -314,10 +314,10 @@ def make_res_layer(block, for i in range(1, blocks): layers.append( block( - inplanes, - planes, - 1, - dilation, + inplanes=inplanes, + planes=planes, + stride=1, + dilation=dilation, style=style, with_cp=with_cp, conv_cfg=conv_cfg, diff --git a/mmdet/models/backbones/resnext.py b/mmdet/models/backbones/resnext.py index b36fa9b3790ea44bf77ac1c1a3abd07a730743f4..c0b42b291e3ef5249c4d1c2ceb2e0993c0e999f9 100644 --- a/mmdet/models/backbones/resnext.py +++ b/mmdet/models/backbones/resnext.py @@ -11,12 +11,12 @@ from ..utils import build_conv_layer, build_norm_layer class Bottleneck(_Bottleneck): - def __init__(self, groups=1, base_width=4, *args, **kwargs): + def __init__(self, inplanes, planes, groups=1, base_width=4, **kwargs): """Bottleneck block for ResNeXt. If style is "pytorch", the stride-two layer is the 3x3 conv layer, if it is "caffe", the stride-two layer is the first 1x1 conv layer. """ - super(Bottleneck, self).__init__(*args, **kwargs) + super(Bottleneck, self).__init__(inplanes, planes, **kwargs) if groups == 1: width = self.planes