MXFusion icon indicating copy to clipboard operation
MXFusion copied to clipboard

Add reparameterization flag to Distributions

Open meissnereric opened this issue 6 years ago • 2 comments

This may be useful for Inference algorithms to use during automatic gradient chaining.

meissnereric avatar Oct 22 '18 12:10 meissnereric

Hey, I would love to contribute. I have read the contributions page and some examples. I am more comfortable with Tensorflow and MXnet is pretty new to me(but example codes look understandable). @meissnereric Can you tell me the files which I should understand before starting?

gowtham1997 avatar Oct 26 '18 11:10 gowtham1997

Hi @gowtham1997, glad to see you're interested!

The main place for this is the Distribution class.

Each Distribution subclass (e.g. Normal) will either be reparameterizable or not. This is based on the logic of how the log_pdf and draw_samples methods are implemented in that particular distribution, and affects certain functionality in how we do inference with the distribution. The Distribution class should manage that parameter, with each subclass passing in it's type to the super call when initialized.

Since this issue doesn't include expanding the inference method's logic to use that flag, you'll only need to add logic to take in the reparametrization type parameter, not actually use it anywhere. That will come later on.

Don't hesitate to ask any followup questions, happy to help explain further!

Cheers, Eric

meissnereric avatar Oct 29 '18 09:10 meissnereric