diff --git a/slim/prune/prune.py b/slim/prune/prune.py index 6f6dcc4cad5de9aede1c67b4de2e296815a646ec..2b7815059ea240f1aaaec645deaea116f37d386e 100644 --- a/slim/prune/prune.py +++ b/slim/prune/prune.py @@ -307,6 +307,9 @@ def main(): if FLAGS.eval: # evaluation + resolution = None + if 'Mask' in cfg.architecture: + resolution = model.mask_head.resolution results = eval_run( exe, compiled_eval_prog, @@ -314,10 +317,8 @@ def main(): eval_keys, eval_values, eval_cls, - cfg=cfg) - resolution = None - if 'mask' in results[0]: - resolution = model.mask_head.resolution + cfg=cfg, + resolution=resolution) box_ap_stats = eval_results( results, cfg.metric,