From f401ef870e6bce8e16325ecd01d0400dea28385c Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Mon, 9 Oct 2023 14:24:39 +0200
Subject: [PATCH] [engine/saliencymap_generator] Improve comments on code

---
 src/ptbench/engine/saliencymap_generator.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/ptbench/engine/saliencymap_generator.py b/src/ptbench/engine/saliencymap_generator.py
index 7605a561..d3233b6a 100644
--- a/src/ptbench/engine/saliencymap_generator.py
+++ b/src/ptbench/engine/saliencymap_generator.py
@@ -203,7 +203,7 @@ def run(
                             _save_saliency_map(use_folder, name, saliency_map)  # type: ignore
 
                     else:
-                        # pytorch-grad-cam will evaluate the output with the
+                        # pytorch-grad-cam will figure out the output with the
                         # highest value and produce a saliency map for it - we
                         # will save it to disk.
                         use_folder = (
@@ -211,6 +211,9 @@ def run(
                         )
                         saliency_map = saliency_map_callable(
                             input_tensor=image,
+                            # setting `targets=None` will set target to the
+                            # maximum output index using
+                            # ClassifierOutputTarget(max_output_index)
                             targets=None,  # type: ignore
                         )
                         _save_saliency_map(use_folder, name, saliency_map)  # type: ignore
-- 
GitLab