Hi, thanks for sharing the code.
I use Grad-CAM in my own classification model, but I got the following error and can't fix it.
Could you please figure out the solutions? Thanks.
Traceback (most recent call last):
File "/remote-home/my/Code/baseline/CAM_Visual.py", line 289, in
main(config, args)
File "/remote-home/my/Code/baseline/CAMVisual.py", line 252, in main
inputs.grad.zero() # 梯度置零
AttributeError: 'NoneType' object has no attribute 'zero_'
Hi, thanks for sharing the code. I use Grad-CAM in my own classification model, but I got the following error and can't fix it. Could you please figure out the solutions? Thanks.
Traceback (most recent call last): File "/remote-home/my/Code/baseline/CAM_Visual.py", line 289, in
main(config, args)
File "/remote-home/my/Code/baseline/CAMVisual.py", line 252, in main
inputs.grad.zero() # 梯度置零
AttributeError: 'NoneType' object has no attribute 'zero_'