andy-wyx commited on
Commit
8bf9677
·
1 Parent(s): 5ad4e9c

updte xai sampling size

Browse files
Files changed (1) hide show
  1. explanations.py +1 -1
explanations.py CHANGED
@@ -129,7 +129,7 @@ def explain(model, input_image,explain_method,nb_samples,size=600, n_classes=171
129
  if len(phi.shape) == 3:
130
  phi = np.mean(phi, -1)
131
  show(X[0],output_size = size)
132
- show(phi, output_size = size,p=1, alpha=0.4, )
133
  # show(X[0][:,size_repetitions:2*size_repetitions,:])
134
  # show(phi[:,size_repetitions:2*size_repetitions], p=1, alpha=0.4)
135
  plt.savefig(f'phi_{e}{i}.png')
 
129
  if len(phi.shape) == 3:
130
  phi = np.mean(phi, -1)
131
  show(X[0],output_size = size)
132
+ show(phi, output_size = size,p=1, alpha=0.2, )
133
  # show(X[0][:,size_repetitions:2*size_repetitions,:])
134
  # show(phi[:,size_repetitions:2*size_repetitions], p=1, alpha=0.4)
135
  plt.savefig(f'phi_{e}{i}.png')