Open Tramac opened 5 years ago
I've seen this error with another model. We will investigate this issue. I'll keep it open for future updates.
Hello, figured out the same issue, by using the example notebook (cnn_pred_explain) in the git repository. Is there a work around? If I try adjusting the files to inp.clone().detach().requiresgrad(True) I get another Error --> seems not to work:
RuntimeError: set_sizes_and_strides is not allowed on a Tensor created from .data or .detach().
If your intent is to change the metadata of a Tensor (such as sizes / strides / storage / storage_offset)
without autograd tracking the change, remove the .data / .detach() call and wrap the change in a with torch.no_grad():
block.
For example, change:
x.data.set_(y)
to:
with torch.nograd():
x.set(y)
Hi, thanks for the great work!
When i set
results = saliency.get_image_saliency_results(model, img, input_tensor, prediction_tensor), methods=['gradcam', 'smooth_grad']
incnn_pred_explain.ipynb
, Error happend:What's wrong with this?