diff --git a/src/ptbench/engine/saliencymap_generator.py b/src/ptbench/engine/saliencymap_generator.py index 7605a5619230c5fe920d3b4842bd2d0234d7bcfe..d3233b6aa3b68f8e68a6c54d8545ffc160911353 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