Advanced AI Explainability for computer vision. Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and more.
I found model parameter use_cuda already removed in the commit: 00711a20b7a8dfb6d6d1d892216997daeeee6288, but in usage_examples/swinT_example.py still use use_cuda. So the user may got error when running the example code.
Steps to Reproduce:
$ python3 usage_examples/swinT_example.py
Using CPU for computation
Exception ignored in: <function BaseCAM.__del__ at 0x7fa71550f820>
Traceback (most recent call last):
File "/home/chilin/.pyenv/versions/pytorch_grad_cam/lib/python3.9/site-packages/pytorch_grad_cam/base_cam.py", line 196, in __del__
self.activations_and_grads.release()
AttributeError: 'ScoreCAM' object has no attribute 'activations_and_grads'
Traceback (most recent call last):
File "/home/chilin/pytorch-grad-cam/usage_examples/swinT_example.py", line 104, in <module>
cam = methods[args.method](model=model,
TypeError: __init__() got an unexpected keyword argument 'use_cuda'
The code execute successfully after removing the parameter, I will create a MR to fix it ! Just leave the issue for someone confused about the error.
Hi,
I found model parameter
use_cuda
already removed in the commit: 00711a20b7a8dfb6d6d1d892216997daeeee6288, but inusage_examples/swinT_example.py
still useuse_cuda
. So the user may got error when running the example code.Steps to Reproduce:
The code execute successfully after removing the parameter, I will create a MR to fix it ! Just leave the issue for someone confused about the error.