Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

SystemError while using ConstrastiveExcitationBackprop #13

@huygens12

Description

@huygens12

Thanks for the nice repo!

I came across an Error while generating saliency map with ConstrastiveExcitationBackprop. The system dependence is the following:

*ubuntu: 16.04.1
*python: 3.6.5
*torch: 1.4.0
*torchvision: 0.5.0

And the error log is the following:

File "/home/lxh/anaconda3/envs/pyt1.1/lib/python3.6/site-packages/torchray/attribution/excitation_backprop.py", line 729, in contrastive_excitation_backprop
output.backward(gradient)
File "/home/lxh/anaconda3/envs/pyt1.1/lib/python3.6/site-packages/torch/tensor.py", line 195, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/lxh/anaconda3/envs/pyt1.1/lib/python3.6/site-packages/torch/autograd/init.py", line 99, in backward
allow_unreachable=True) # allow_unreachable flag
File "/home/lxh/anaconda3/envs/pyt1.1/lib/python3.6/site-packages/torch/autograd/function.py", line 77, in apply
return self.forward_cls.backward(self, *args)
File "/home/lxh/anaconda3/envs/pyt1.1/lib/python3.6/site-packages/torchray/attribution/excitation_backprop.py", line 385, in backward
input
= ctx.saved_tensors[0].detach()
SystemError: <built-in method detach of Tensor object at 0x7fc8c5804168> returned a result with an error set

When I downgrade the torch version to 1.1.0 and torchvision version to 0.3.0. This issue will not appear.

Although it works for the older version for torch, I'm thinking maybe you can check this issue out?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions