I’m not sure which input you are looking for, but you can pass the gradient directly to the backward function.
The default would be a scalar value of 1. If you need to provide a specific gradient, you could use loss.backward(gradient=...).