Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Smartappli authored May 25, 2024
1 parent 0d9922f commit e9dee88
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fl_common/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,7 @@ def generate_xai_heatmaps(model, image_tensor, label, save_dir, methods=None):
plt.imshow(attributions_np, cmap="viridis")
plt.title(f"XAI Heatmap for {method_name} (Label: {label})")
plt.colorbar()
save_path = os.path.join(
save_dir,
f"xai_heatmap_{method_name}_{label}.png",
)
save_path = save_dir, + '/' + f"xai_heatmap_{method_name}_{label}.png"
plt.savefig(save_path)
plt.show()

Expand Down

0 comments on commit e9dee88

Please sign in to comment.