Skip to content

Commit

Permalink
update resnet
Browse files Browse the repository at this point in the history
  • Loading branch information
OceanPang committed Dec 18, 2018
1 parent d6b3cbd commit b77b98a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mmdet/models/backbones/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,24 +219,24 @@ def __init__(self,
super(ResNet, self).__init__()
if depth not in self.arch_settings:
raise KeyError('invalid depth {} for resnet'.format(depth))
self.depth = depth,
self.num_stages = num_stages,
self.strides = strides,
self.dilations = dilations,
self.depth = depth
self.num_stages = num_stages
assert num_stages >= 1 and num_stages <= 4
self.block, self.stage_blocks = self.arch_settings[depth]
self.stage_blocks = self.stage_blocks[:num_stages]
self.strides = strides
self.dilations = dilations
assert len(strides) == len(dilations) == num_stages
assert max(out_indices) < num_stages

self.out_indices = out_indices
assert max(out_indices) < num_stages
self.style = style
self.frozen_stages = frozen_stages
self.bn_eval = bn_eval
self.bn_frozen = bn_frozen
self.with_cp = with_cp

self.block, stage_blocks = self.arch_settings[depth]
self.stage_blocks = stage_blocks[:num_stages]
self.inplanes = 64

self.conv1 = nn.Conv2d(
3, 64, kernel_size=7, stride=2, padding=3, bias=False)
self.bn1 = nn.BatchNorm2d(64)
Expand Down

0 comments on commit b77b98a

Please sign in to comment.