Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mednet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
medai
software
mednet
Commits
15567828
Commit
15567828
authored
1 year ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[engine/saliencymap_generator] Improve comments on code
parent
6d55bba1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ptbench/engine/saliencymap_generator.py
+4
-1
4 additions, 1 deletion
src/ptbench/engine/saliencymap_generator.py
with
4 additions
and
1 deletion
src/ptbench/engine/saliencymap_generator.py
+
4
−
1
View file @
15567828
...
@@ -203,7 +203,7 @@ def run(
...
@@ -203,7 +203,7 @@ def run(
_save_saliency_map
(
use_folder
,
name
,
saliency_map
)
# type: ignore
_save_saliency_map
(
use_folder
,
name
,
saliency_map
)
# type: ignore
else
:
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
# highest value and produce a saliency map for it - we
# will save it to disk.
# will save it to disk.
use_folder
=
(
use_folder
=
(
...
@@ -211,6 +211,9 @@ def run(
...
@@ -211,6 +211,9 @@ def run(
)
)
saliency_map
=
saliency_map_callable
(
saliency_map
=
saliency_map_callable
(
input_tensor
=
image
,
input_tensor
=
image
,
# setting `targets=None` will set target to the
# maximum output index using
# ClassifierOutputTarget(max_output_index)
targets
=
None
,
# type: ignore
targets
=
None
,
# type: ignore
)
)
_save_saliency_map
(
use_folder
,
name
,
saliency_map
)
# type: ignore
_save_saliency_map
(
use_folder
,
name
,
saliency_map
)
# type: ignore
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment