提交 b4eaa7a7 编写于 作者: S seven

tutorial: interpret one image

上级 43046bfa
...@@ -29,18 +29,11 @@ import numpy as np ...@@ -29,18 +29,11 @@ import numpy as np
np.random.seed(5) np.random.seed(5)
perm = np.random.permutation(len(test_dataset.file_list)) perm = np.random.permutation(len(test_dataset.file_list))
for i in range(len(test_dataset.file_list)): # 可解释性可视化
pdx.interpret.normlime(
# 可解释性可视化 test_dataset.file_list[0][0],
pdx.interpret.normlime( model,
test_dataset.file_list[perm[i]][0], test_dataset,
model, save_dir='./',
test_dataset, normlime_weights_file='{}_{}.npy'.format(
save_dir='./', dataset.split('/')[-1], model.model_name))
normlime_weights_file='{}_{}.npy'.format(
dataset.split('/')[-1], model.model_name))
if i == 1:
# first iter will have an initialization process, followed by the interpretation.
# second iter will directly load the initialization process, followed by the interpretation.
break
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册