The loop should print gradients, if they have been already calculated.
Make sure to call backward before running this code.
Also, if some parameters were unused during the forward pass, their gradients will stay None.