I‘m trying to rewrite the deepfool code in PyTorch0.4, but there are some problems on var.grad. I don’t know why I can’t get the gradients of a Tensor, I’d appreciate if someone could help me.
选区_001.png1340×148 31.2 KB