Prasad_Raghavendra:

Parameter wraps a numpy array as a tensor.


That is not true.
To get a Tensor from a numpy array, you can do t = torch.from_numpy(your_numpy_array).
A nn.Parameter is a thin wrapper around Tensor that has special meaning in the torch.nn library. Namely it is a parameter of a Module and so will be returned by mod.parameters() call.

But, how do I invoke autograd.grad()

grads = autograd.grad(loss, model.parameters())