Hi,
Forgive me if I make stupid mistakes…
I am running the code in the eval() mode and trying to get the gradient matrix for each input x, respectively.
For example, if we have 128 inputs (in a batch), we will get 128 different gradient matrixes.
I try to use model.net.fc.weight.grad.clone() to get the gradient, but the model.net.fc.weight.grad is a NoneType object…
Is there any solution for that?
Thank you in advance!