pooya-mohammadi / yolov5-gradcam

Visualizing Yolov5's layers using GradCam

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why register_backward_hook() got the zero gradient

infochen opened this issue · comments

I took the gradcam for yolov3 and revise a little.
I have no idea about why register_backward_hook() couldn't get the gradient. The register_forward_hook() is ok.
can you help me, thanks a lot.
image

I used yolov3.pt for the yolov5-gradcam. The result like this:

image

I didn't change anything this time. I am confused about this situation

I figured out! I choose wrong layer before and the choosed layer' size must small.

Hello, I have the same problem, may I ask how to solve it