未验证 提交 43fb955b 编写于 作者: W wangguanzhong 提交者: GitHub

fix_mobilenetv3_rcnn (#1129)

上级 9d8b8b7d
...@@ -68,6 +68,9 @@ class MobileNetV3(object): ...@@ -68,6 +68,9 @@ class MobileNetV3(object):
if isinstance(feature_maps, Integral): if isinstance(feature_maps, Integral):
feature_maps = [feature_maps] feature_maps = [feature_maps]
if norm_type == 'sync_bn' and freeze_norm:
raise ValueError(
"The norm_type should not be sync_bn when freeze_norm is True")
self.scale = scale self.scale = scale
self.model_name = model_name self.model_name = model_name
self.feature_maps = feature_maps self.feature_maps = feature_maps
...@@ -437,8 +440,7 @@ class MobileNetV3(object): ...@@ -437,8 +440,7 @@ class MobileNetV3(object):
@register @register
class MobileNetV3RCNN(MobileNetV3): class MobileNetV3RCNN(MobileNetV3):
def __init__( def __init__(self,
self,
scale=1.0, scale=1.0,
model_name='large', model_name='large',
conv_decay=0.0, conv_decay=0.0,
...@@ -446,7 +448,7 @@ class MobileNetV3RCNN(MobileNetV3): ...@@ -446,7 +448,7 @@ class MobileNetV3RCNN(MobileNetV3):
norm_decay=0.0, norm_decay=0.0,
freeze_norm=True, freeze_norm=True,
feature_maps=[2, 3, 4, 5], feature_maps=[2, 3, 4, 5],
lr_mult_list=[1.0, 1.0, 1.0, 1.0, 1.0], ): lr_mult_list=[1.0, 1.0, 1.0, 1.0, 1.0]):
super(MobileNetV3RCNN, self).__init__( super(MobileNetV3RCNN, self).__init__(
scale=scale, scale=scale,
model_name=model_name, model_name=model_name,
...@@ -454,7 +456,8 @@ class MobileNetV3RCNN(MobileNetV3): ...@@ -454,7 +456,8 @@ class MobileNetV3RCNN(MobileNetV3):
norm_type=norm_type, norm_type=norm_type,
norm_decay=norm_decay, norm_decay=norm_decay,
lr_mult_list=lr_mult_list, lr_mult_list=lr_mult_list,
feature_maps=feature_maps) feature_maps=feature_maps,
freeze_norm=freeze_norm)
self.curr_stage = 0 self.curr_stage = 0
self.block_stride = 1 self.block_stride = 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册