Applying hooks for activation volumes #3122
Unanswered
johanenforcer
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@johanenforcer this is a good question. I don't use many hooks myself so I can't really help you, but if you get this working please consider submitting a PR to help everyone out who is also trying to visualize feature maps! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently trying to implement a pytorch hook to retrieve the activation volume from certain layers, in this case I would like to retrieve the activation output from the penultimate module in specifically the yolov5m.yaml file. Specifically this is the C3 module and in this module I would like to get the activations from self.cv3, so the last convolution layer in this module. Since the modules are called and used from the yolo.py file, surely I would have to define the forward hook in this file, but I am not certain exactly where, as it feels weird to do it in either the init or forward instance method of the Model class.
The forward hook would look something like this:
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions