未验证 提交 7257a364 编写于 作者: G Guanghua Yu 提交者: GitHub

fix condition of mask (#1881)

上级 c5c91cee
...@@ -109,7 +109,8 @@ def run(FLAGS, cfg, place): ...@@ -109,7 +109,8 @@ def run(FLAGS, cfg, place):
use_default_label) use_default_label)
mask_resolution = None mask_resolution = None
if cfg['MaskPostProcess']['mask_resolution'] is not None: if 'Mask' in cfg.architecture and cfg['MaskPostProcess'][
'mask_resolution'] is not None:
mask_resolution = int(cfg['MaskPostProcess']['mask_resolution']) mask_resolution = int(cfg['MaskPostProcess']['mask_resolution'])
infer_res = get_infer_results( infer_res = get_infer_results(
outs_res, outs_res,
......
...@@ -161,7 +161,8 @@ def run(FLAGS, cfg, place): ...@@ -161,7 +161,8 @@ def run(FLAGS, cfg, place):
im_ids = data[fields.index('im_id')].numpy() im_ids = data[fields.index('im_id')].numpy()
mask_resolution = None mask_resolution = None
if cfg['MaskPostProcess']['mask_resolution'] is not None: if 'Mask' in cfg.architecture and cfg['MaskPostProcess'][
'mask_resolution'] is not None:
mask_resolution = int(cfg['MaskPostProcess']['mask_resolution']) mask_resolution = int(cfg['MaskPostProcess']['mask_resolution'])
batch_res = get_infer_results( batch_res = get_infer_results(
[outs], [outs],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册