eriklindernoren / PyTorch-GAN

PyTorch implementations of Generative Adversarial Networks.
MIT License
16.51k stars 4.09k forks source link

plot gradient norm and weight clipping for each layer #178

Open utkarsh0902311047 opened 2 years ago

utkarsh0902311047 commented 2 years ago

Hi, I was trying to plot the gradient norm and weight clipping for each layer as in the paper "Improved Training of Wasserstein GANs". But I am stuck on how to take the gradient norm of each layer. Can someone give some idea or help how it can be done?

Thank you