Yeah, I think you’re right. weight.grad contains what’s computed after batch gradients are averaged.
I think you can explicitly get the gradient of a particular input by

torch.autograd.grad(out, x)[0]

where out is the model’s output and x is the particular input you’re interested in.