You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Approximate the target `model` via the variational inference algorithm `algorithm` by starting from the initial variational approximation `q`.
266
283
This is a thin wrapper around `AdvancedVI.optimize`.
284
+
285
+
If the chosen variational inference algorithm operates in an unconstrained space, then the provided initial variational approximation `q` must be a `Bijectors.TransformedDistribution` of an unconstrained distribution.
286
+
For example, the initialization supplied by `q_meanfield_gaussian`,`q_fullrank_gaussian`, `q_locationscale`.
287
+
267
288
The default `algorithm`, `KLMinRepGradProxDescent` ([relevant docs](https://turinglang.org/AdvancedVI.jl/dev/klminrepgradproxdescent/)), assumes `q` uses `AdvancedVI.MvLocationScale`, which can be constructed by invoking `q_fullrank_gaussian` or `q_meanfield_gaussian`.
268
-
For other variational families, refer to `AdvancedVI` to determine the best algorithm and options.
289
+
For other variational families, refer the documentation of `AdvancedVI` to determine the best algorithm and other options.
@assert q isa Bijectors.TransformedDistribution "The algorithm $(algorithm) operates in an unconstrained space. Therefore, the initial variational approximation is expected to be a Bijectors.TransformedDistribution of an unconstrained distribution."
324
+
vi = DynamicPPL.ldf_default_varinfo(model, DynamicPPL.getlogjoint_internal)
0 commit comments