How do I normalize the gradient of each pixel in an autoencoder

So There is this paper: Gradient Normalization Explained | Papers With Code

I want to scale the idea of this paper to the outputs of full-on autoencoder rather than a single output like a discriminator. However I am not sure or have a nice way to take the gradient norm of each pixel individually. Is there anything that I can do? Thank you in advance