Continue backward from tensor.grad

Many thanks! @ptrblck . Never thought we can write backwards this way.
Just want to make sure.

x = nn.Parameter(...)
y = x**2

And I manage to calculate y’s grad with another package and want to update x.
So I can write as, correct?

y.backward(y.grad)