Open seed851218 opened 3 years ago
this is work
but code didnt get in this function
This is my foward function
This is my backward function
on the enjoy script , if I remove the code "with torch.no_grad():" that it gives me the bug:
Traceback (most recent call last):
File "enjoy.py", line 139, in
can anyone help me? Thank u so much.
@ikostrikov Need ur help. I stuck on this for a long time.
did you solve this?
I am new on this code, My question is that if i want to get the grad on the CNN layer by using register_backward_hook function. Should I remove the code "with torch.no_grad():" when training this model? I modify the other grad-cam code but still get bug when I call "register_backward_hook" function. Is there any one can help me or any example? My English is not good, Thank u!