PyTorch Reparametrization Method For Gamma, Dirichlet, Von Mises distribution

Does anyone know that which algorithm PyTorch exactly uses for Gamma, Dirichlet, and Von Mises distributions? I searched in the PyTorch repository and didn’t find anything readable.


In case anyone is concerned: I found out that PyTorch uses this method according to the Implicit Reparametrization Gradient paper.

Hey Hamed - did you find out through the code or through reading the paper? If through the code can you please give a github reference?


I found out this fact from this github issue which is mentioned by @fritzo:

thanks for replying. how is your experience using some of the distributions? i tend to find them unstable close to the optimum.

the reason I say it is unstable close to the optimum is because I have a same version of code in TFP, and it works much better than the same one with torch distributions.

@DonnyHe Sorry for my late answer, I didn’t test my code on TFP, but I can test it in the upcoming days