How to implement Gradient Clipping and Weight Regularization in Pyro


#1

How to implement Gradient Clipping and Weight Regularization in Pyro. Because I experienced a gradient explosion in the process of using the Pyro training model. The usage of the documentation is very general to call the optimization algorithm, for example,
optimizer = Adam({"lr": 1e-3, "betas": (0.9, 0.999)})


#2

Hi @isforalan, there is a ClippedAdam optimizer implemented in Pyro for you to use.


#3

Thank you.:laughing: