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

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

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