Closed danielward27 closed 1 year ago
Adds a sample_and_log_prob method for Distribution. In Distribution this relies on _sample and _log_prob methods separately. However, for Transformed distributions, we reimplement it to avoid computing the inverse transformation.
sample_and_log_prob
Distribution
_sample
_log_prob
Transformed
Adds a
sample_and_log_prob
method forDistribution
. InDistribution
this relies on_sample
and_log_prob
methods separately. However, forTransformed
distributions, we reimplement it to avoid computing the inverse transformation.