未验证 提交 2f22d577 编写于 作者: B Bai Yifan 提交者: GitHub

fix subclasses do not have 'weight_prefix_name' attr bug (#3572)

上级 c1d55974
......@@ -424,7 +424,8 @@ class ResNetC5(ResNet):
freeze_norm=True,
norm_decay=0.,
variant='b',
feature_maps=[5]):
feature_maps=[5],
weight_prefix_name=''):
super(ResNetC5, self).__init__(depth, freeze_at, norm_type, freeze_norm,
norm_decay, variant, feature_maps)
self.severed_head = True
......@@ -50,7 +50,8 @@ class ResNeXt(ResNet):
norm_decay=True,
variant='a',
feature_maps=[2, 3, 4, 5],
dcn_v2_stages=[]):
dcn_v2_stages=[],
weight_prefix_name=''):
assert depth in [50, 101, 152], "depth {} should be 50, 101 or 152"
super(ResNeXt, self).__init__(depth, freeze_at, norm_type, freeze_norm,
norm_decay, variant, feature_maps)
......@@ -80,7 +81,8 @@ class ResNeXtC5(ResNeXt):
freeze_norm=True,
norm_decay=True,
variant='a',
feature_maps=[5]):
feature_maps=[5],
weight_prefix_name=''):
super(ResNeXtC5, self).__init__(depth, groups, group_width, freeze_at,
norm_type, freeze_norm, norm_decay,
variant, feature_maps)
......
......@@ -56,7 +56,8 @@ class SENet(ResNeXt):
variant='d',
feature_maps=[2, 3, 4, 5],
dcn_v2_stages=[],
std_senet=False):
std_senet=False,
weight_prefix_name=''):
super(SENet, self).__init__(depth, groups, group_width, freeze_at,
norm_type, freeze_norm, norm_decay, variant,
feature_maps)
......@@ -113,7 +114,8 @@ class SENetC5(SENet):
freeze_norm=True,
norm_decay=0.,
variant='d',
feature_maps=[5]):
feature_maps=[5],
weight_prefix_name=''):
super(SENetC5, self).__init__(depth, groups, group_width, freeze_at,
norm_type, freeze_norm, norm_decay,
variant, feature_maps)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册