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

Error in function Saliency_map() #5

Open
HariniNarasimhan opened this issue Nov 4, 2020 · 0 comments
Open

Error in function Saliency_map() #5

HariniNarasimhan opened this issue Nov 4, 2020 · 0 comments

Comments

@HariniNarasimhan
Copy link

AttributeError Traceback (most recent call last)
AttributeError: 'functools.partial' object has no attribute 'name'

The above exception was the direct cause of the following exception:

SystemError Traceback (most recent call last)
in
----> 1 map=Saliency_map(img,model,preprocess,4,use_gpu,method)

in Saliency_map(image, model, preprocess, ground_truth, use_gpu, method)
20 energy=output[0,ground_truth]
21 print(energy)
---> 22 energy.backward()
23 grad=input.grad
24 if use_gpu:

~\Anaconda3\lib\site-packages\torch\tensor.py in backward(self, gradient, retain_graph, create_graph)
148 products. Defaults to False.
149 """
--> 150 torch.autograd.backward(self, gradient, retain_graph, create_graph)
151
152 def register_hook(self, hook):

~\Anaconda3\lib\site-packages\torch\autograd_init_.py in backward(tensors, grad_tensors, retain_graph, create_graph, grad_variables)
97 Variable._execution_engine.run_backward(
98 tensors, grad_tensors, retain_graph, create_graph,
---> 99 allow_unreachable=True) # allow_unreachable flag
100
101

SystemError: PyEval_EvalFrameEx returned a result with an error set

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