diff --git a/paddlex/cv/models/utils/pretrain_weights.py b/paddlex/cv/models/utils/pretrain_weights.py index b865cc7fdba1931b51559b1d5d42e9f56b0759a0..cd8213c96dd44a5469f6e4f85de1c1b80d9d9d18 100644 --- a/paddlex/cv/models/utils/pretrain_weights.py +++ b/paddlex/cv/models/utils/pretrain_weights.py @@ -146,7 +146,8 @@ def get_pretrain_weights(flag, class_name, backbone, save_dir): if flag == 'COCO': if class_name == 'DeepLabv3p' and backbone in [ 'Xception41', 'MobileNetV2_x0.25', 'MobileNetV2_x0.5', - 'MobileNetV2_x1.5', 'MobileNetV2_x2.0' + 'MobileNetV2_x1.5', 'MobileNetV2_x2.0', + 'MobileNetV3_large_x1_0_ssld' ]: model_name = '{}_{}'.format(class_name, backbone) logging.warning(warning_info.format(model_name, flag, 'IMAGENET')) @@ -169,8 +170,7 @@ def get_pretrain_weights(flag, class_name, backbone, save_dir): flag = 'IMAGENET' if class_name == 'DeepLabv3p' and backbone in [ 'Xception41', 'MobileNetV2_x0.25', 'MobileNetV2_x0.5', - 'MobileNetV2_x1.5', 'MobileNetV2_x2.0', - 'MobileNetV3_large_x1_0_ssld' + 'MobileNetV2_x1.5', 'MobileNetV2_x2.0' ]: model_name = '{}_{}'.format(class_name, backbone) logging.warning(warning_info.format(model_name, flag, 'IMAGENET')) diff --git a/paddlex/cv/nets/mobilenet_v3.py b/paddlex/cv/nets/mobilenet_v3.py index 750692b6a5fb92537a44a485d56533e001eb2ca8..67a43bf193d28ad7ddd92815a17d6619ba4475ba 100644 --- a/paddlex/cv/nets/mobilenet_v3.py +++ b/paddlex/cv/nets/mobilenet_v3.py @@ -150,7 +150,8 @@ class MobileNetV3(): else: raise NotImplementedError - self.modify_bottle_params(output_stride) + if self.for_seg: + self.modify_bottle_params(output_stride) def modify_bottle_params(self, output_stride=None): if output_stride is not None and output_stride % 2 != 0: