Register_hook with GradScalar

I am using a register_hook on a tensor to print the gradients on stdout while using GradScaler in mixed precision mode during training. Do the prints on stdout reflect the scaled gradients or the unscaled ones?


If you are using a torch.cuda.amp.GradScaler and print the gradients during the backward pass, the scaled gradients are shown.