From a0fb35bf6d9fa28c150b160c8c386b8882d41dfd Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Tue, 15 Dec 2020 15:35:18 +0800 Subject: [PATCH] fix_cascade_export (#1897) --- tools/export_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/export_utils.py b/tools/export_utils.py index a357a4f39..48068b5e6 100644 --- a/tools/export_utils.py +++ b/tools/export_utils.py @@ -109,7 +109,7 @@ def dump_infer_config(config, path, image_shape, model): 'Architecture: {} is not supported for exporting model now'.format( infer_arch)) os._exit(0) - if 'mask_post_process' in model.__dict__: + if getattr(model.__dict__, 'mask_post_process', None): infer_cfg['mask_resolution'] = model.mask_post_process.mask_resolution infer_cfg['with_background'], infer_cfg['Preprocess'], infer_cfg[ 'label_list'], image_shape = parse_reader( -- GitLab