What is the return value of torch.autograd.grad function? The common way is to just use it like this:

gradients = torch.autograd.grad(loss, model.parameters())

which is fine. But I have also seen people using this:

(gradients,) = torch.autograd.grad(loss, model.parameters())

I just want to know the exact return values of the grad function.