未验证 提交 0ca4cd5b 编写于 作者: S SunAhong1993 提交者: GitHub

Update visualize.py

上级 fd882edb
......@@ -28,6 +28,9 @@ def visualize(img_file,
num_samples=3000,
batch_size=50,
save_dir='./'):
model_info = self.get_model_info()
if model_info['status'] != 'Normal':
raise Exception('The explanation only can deal with the Normal model')
model.arrange_transforms(
transforms=model.test_transforms, mode='test')
tmp_transforms = copy.deepcopy(model.test_transforms)
......@@ -110,4 +113,4 @@ def precompute_for_normlime(predict_func, normlime_dataset, num_samples=3000, ba
save_dir=save_dir)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册