From 7e661ba9cf8dbcc7d85ce382b41bee3f5c6b5c35 Mon Sep 17 00:00:00 2001 From: SunAhong1993 <48579383+SunAhong1993@users.noreply.github.com> Date: Sat, 16 May 2020 16:34:21 +0800 Subject: [PATCH] Update visualize.py --- paddlex/cv/models/explanation/visualize.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paddlex/cv/models/explanation/visualize.py b/paddlex/cv/models/explanation/visualize.py index 97505cc..9da7ba3 100644 --- a/paddlex/cv/models/explanation/visualize.py +++ b/paddlex/cv/models/explanation/visualize.py @@ -28,8 +28,7 @@ def visualize(img_file, num_samples=3000, batch_size=50, save_dir='./'): - model_info = moedl.get_model_info() - if model_info['status'] != 'Normal': + if model.status != 'Normal': raise Exception('The explanation only can deal with the Normal model') model.arrange_transforms( transforms=model.test_transforms, mode='test') -- GitLab