Closed jeremiecoullon closed 3 years ago
This is merge in master. I created a "diffusion_factory" that generation diffusion decorators. This factory takes in arguments (is_palidrome
and is_sghmc
). The random key is passed in both updates (even though it seems that the second upate might never need randomness.
How to add diffusion solvers that are palidromes (ex: BAOAB or NOGIN)? These will usually (perhaps always?) need a gradient update halfway through the solver, so one solution is to have the
update
function in 2 parts. That way you calculate the gradient in between.Example:
Some issues:
diffusion
decorator (indiffusions.py
), or extend the current one? Example: the decorator could take in an argumentpalidrome=False
.diffusion
decorator: if we do this, then this should also work nicely with the hmc diffusion, which currently returnsresample_momentum
as well as the usual 3 functions.