Skip to content
Snippets Groups Projects
Unverified Commit 5305a459 authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

Merge pull request #323 from hellock/master

Minor fix for dcn check in the backbone
parents 3b43f490 716457e8
No related branches found
No related tags found
No related merge requests found
...@@ -331,8 +331,7 @@ class ResNet(nn.Module): ...@@ -331,8 +331,7 @@ class ResNet(nn.Module):
assert num_stages >= 1 and num_stages <= 4 assert num_stages >= 1 and num_stages <= 4
self.strides = strides self.strides = strides
self.dilations = dilations self.dilations = dilations
assert len(strides) == len(dilations) == len( assert len(strides) == len(dilations) == num_stages
stage_with_dcn) == num_stages
self.out_indices = out_indices self.out_indices = out_indices
assert max(out_indices) < num_stages assert max(out_indices) < num_stages
self.style = style self.style = style
...@@ -342,6 +341,8 @@ class ResNet(nn.Module): ...@@ -342,6 +341,8 @@ class ResNet(nn.Module):
self.norm_eval = norm_eval self.norm_eval = norm_eval
self.dcn = dcn self.dcn = dcn
self.stage_with_dcn = stage_with_dcn self.stage_with_dcn = stage_with_dcn
if dcn is not None:
assert len(stage_with_dcn) == num_stages
self.zero_init_residual = zero_init_residual self.zero_init_residual = zero_init_residual
self.block, stage_blocks = self.arch_settings[depth] self.block, stage_blocks = self.arch_settings[depth]
self.stage_blocks = stage_blocks[:num_stages] self.stage_blocks = stage_blocks[:num_stages]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment