Adds a default log partition function estimator and derivative estimator.
Part of #140. Estimating the QMHL loss requires estimating the log partition function. Equation C1 in the appendix provides a sample-based approximation to it. Here I implemented this approximation in the base EnergyInference classEstimator was low quality, so this is no longer included; instead, each subclass implements its own log partition forward pass.
More importantly, estimating the derivative of the QMHL loss requires estimating the derivative of the log partition function. Luckily this quantity is more well behaved than the log partition itself: an estimator is provided in equation C2 of the appendix. This is implemented as the default for the EnergyInference class.
Adds a default log partition function estimator and derivative estimator.
Part of #140. Estimating the QMHL loss requires estimating the log partition function.
Equation C1 in the appendix provides a sample-based approximation to it. Here I implemented this approximation in the baseEstimator was low quality, so this is no longer included; instead, each subclass implements its own log partition forward pass.EnergyInference
classMore importantly, estimating the derivative of the QMHL loss requires estimating the derivative of the log partition function. Luckily this quantity is more well behaved than the log partition itself: an estimator is provided in equation C2 of the appendix. This is implemented as the default for the
EnergyInference
class.Depends on #175