Open eb8680 opened 6 years ago
Note regarding #628 and https://forum.pyro.ai/t/checkpoint-in-pyro/303:
There are some disadvantages of using grad
instead of .backward()
(at least in Trace_ELBO
):
grad
has less jit
support at the momentgrad
has no checkpointing support at the momentgrad
is slightly more expensive for tiny tensors (since it traverses the graph twice)However these are minor and could be outweighed by code simplification.
The internals of our SVI code need a bit of cleanup to better support nesting
SVI
inside other inference algorithms, a necessary component of several projects includingcontrib.oed
.Tasks:
infer.SVI
aTracePosterior
instance again so that it works withEmpiricalMarginal
and can be interchanged with other methods likeMCMC
step
update the parameter store with new values instead of updating parameter tensors in place aspyro.optim.PyroOptim
optimizers do