drckf / paysage

Unsupervised learning and generative models in python/pytorch.
Other
119 stars 25 forks source link

Use State for sampling #70

Closed jrwalsh1 closed 7 years ago

jrwalsh1 commented 7 years ago

Uses a State object for sampling models. State is a container of values of units for the layers in a model, and stores the values between sampling. Previously, the negative phase visible units were stored, while the values of hidden units were not and were only computed inside of functions.

The PR currently leaves the gradient calculation the same, since I thought it was better to separate out API changes from functional changes.

drckf commented 7 years ago

Should run gendocs.py before merge to update the docs.

jrwalsh1 commented 7 years ago

I updated the gradient to handle >2 layers.