I want to do this
grads = grad(loss, model.parameters())

But I am using nn.Module to define my model. It runs backward() function automatically but I want backward() function not to calculate any grads and want to compute grads myself.
How can I omit backward() function and can prevent to perform any gradient calculation when I call my model?