masa-su / pixyz

A library for developing deep generative models in a more concise, intuitive and extendable way
https://pixyz.io
MIT License
487 stars 41 forks source link

Support old usage of bernoulli distribution #172

Closed ktaaaki closed 3 years ago

ktaaaki commented 3 years ago

Due to the version update of pytorch, the likelihood calculation of Bernoulli distribution is now defined only for {0, 1}.

In order to use Bernoulli distribution for modeling continuous values such as pixel luminance, Bernoulli.log_prob was overridden to avoid errors in the conventional usage.