Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed hooking mechanism #23

Merged
merged 4 commits into from
Nov 12, 2020
Merged

fix: Fixed hooking mechanism #23

merged 4 commits into from
Nov 12, 2020

Conversation

frgfm
Copy link
Owner

@frgfm frgfm commented Nov 12, 2020

This PR fixes hook handle sharing between CAMs. This issue can only be encountered if you loop on different cam extractors and was reported in #22. Additionally, the PR optimizes memory usage in the example script.

This will close #22

@frgfm frgfm added bug Something isn't working module: methods Related to torchcam.methods ext: scripts labels Nov 12, 2020
@frgfm frgfm added this to the 0.1.2 milestone Nov 12, 2020
@frgfm frgfm self-assigned this Nov 12, 2020
@codecov
Copy link

codecov bot commented Nov 12, 2020

Codecov Report

Merging #23 (a25874b) into master (9a31c57) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #23   +/-   ##
=======================================
  Coverage   96.19%   96.19%           
=======================================
  Files           4        4           
  Lines         210      210           
=======================================
  Hits          202      202           
  Misses          8        8           
Impacted Files Coverage Δ
torchcam/cams/cam.py 96.85% <100.00%> (ø)
torchcam/cams/gradcam.py 97.05% <100.00%> (ø)

@frgfm frgfm merged commit 5bd8a8c into master Nov 12, 2020
@frgfm frgfm deleted the hook-fix branch November 12, 2020 14:01
@frgfm frgfm mentioned this pull request Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ext: scripts module: methods Related to torchcam.methods
Projects
None yet
Development

Successfully merging this pull request may close these issues.

self.hook_g is None
1 participant