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

predict有问题 #7

Open
cx330a opened this issue May 31, 2024 · 0 comments
Open

predict有问题 #7

cx330a opened this issue May 31, 2024 · 0 comments

Comments

@cx330a
Copy link

cx330a commented May 31, 2024

我想要生成热力图出现报错
屏幕截图 2024-05-31 155623

Exception ignored in: <function BaseCAM.del at 0x00000198F079A040>
Traceback (most recent call last):
File "D:\Users\15318\anaconda3\envs\pytorch\lib\site-packages\pytorch_grad_cam\base_cam.py", line 196, in del
self.activations_and_grads.release()
AttributeError: 'GradCAM' object has no attribute 'activations_and_grads'
Traceback (most recent call last):
File "d:/pytorch-classifier-master/pytorch-classifier-master/predict.py", line 65, in
cam_model = cam_visual(model, test_transform,DEVICE, opt)
File "d:\pytorch-classifier-master\pytorch-classifier-master\utils\utils.py", line 664, in init
self.cam_model = eval(opt.cam_type)(model=model, target_layers=model.cam_layer(), use_cuda=(DEVICE.type != 'cpu'))
TypeError: init() got an unexpected keyword argument 'use_cuda'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant