Skip to content

Commit

Permalink
only apply dcn to layer 2, 3, 4
Browse files Browse the repository at this point in the history
  • Loading branch information
yhcao6 committed Jan 31, 2019
1 parent 4a4b10f commit c17fa9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmdet/models/backbones/resnext.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def __init__(self, groups=1, base_width=4, **kwargs):
for i, num_blocks in enumerate(self.stage_blocks):
stride = self.strides[i]
dilation = self.dilations[i]
dcn = self.dcn if self.stage_with_dcn[i] else None
planes = 64 * 2**i
res_layer = make_res_layer(
self.block,
Expand All @@ -196,7 +197,7 @@ def __init__(self, groups=1, base_width=4, **kwargs):
style=self.style,
with_cp=self.with_cp,
normalize=self.normalize,
dcn=self.dcn)
dcn=dcn)
self.inplanes = planes * self.block.expansion
layer_name = 'layer{}'.format(i + 1)
self.add_module(layer_name, res_layer)
Expand Down

0 comments on commit c17fa9a

Please sign in to comment.