pymc.variational.Trainer.fit#
- Trainer.fit(n=10000, **kwargs)[source]#
Fit for
nsteps, streaming minibatches into the model’s placeholder.Exactly
nminibatches are fed to the model: the first seeds the placeholder before step 0, and the advance after the final step is skipped. The accounting stream reads one batch ahead so the pass-size check can fire at a pass boundary, so a re-readable source (the only kind the loader accepts) may be read one batch past thenthe model uses. Keyword arguments are forwarded topymc.fit()on top of the constructor’sfit_kwargs(per-call wins);progressbardefaults toFalseunless either sets it.- Returns:
ApproximationThe fitted approximation, as returned by
pymc.fit().