Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GuideMessenger, AutoNormalMessenger, AutoRegressiveMessenger #2953

Merged
merged 22 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/source/infer.autoguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,30 @@ AutoGaussian
:member-order: bysource
:show-inheritance:

AutoMessenger
-------------
.. autoclass:: pyro.infer.autoguide.AutoMessenger
:members:
:undoc-members:
:member-order: bysource
:show-inheritance:

AutoNormalMessenger
-------------------
.. autoclass:: pyro.infer.autoguide.AutoNormalMessenger
:members:
:undoc-members:
:member-order: bysource
:show-inheritance:

AutoRegressiveMessenger
-----------------------
.. autoclass:: pyro.infer.autoguide.AutoRegressiveMessenger
:members:
:undoc-members:
:member-order: bysource
:show-inheritance:

.. _autoguide-initialization:

Initialization
Expand Down
7 changes: 7 additions & 0 deletions docs/source/inference_algos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ ELBO
:show-inheritance:
:member-order: bysource

.. automodule:: pyro.infer.effect_elbo
:members:
:undoc-members:
:special-members: __call__
:show-inheritance:
:member-order: bysource

Importance
----------

Expand Down
16 changes: 10 additions & 6 deletions pyro/infer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pyro.infer.abstract_infer import EmpiricalMarginal, TracePosterior, TracePredictive
from pyro.infer.csis import CSIS
from pyro.infer.discrete import infer_discrete
from pyro.infer.effect_elbo import Effect_ELBO, GuideMessenger, JitEffect_ELBO
from pyro.infer.elbo import ELBO
from pyro.infer.energy_distance import EnergyDistance
from pyro.infer.enum import config_enumerate
Expand All @@ -27,17 +28,16 @@
from pyro.infer.util import enable_validation, is_validation_enabled

__all__ = [
"config_enumerate",
"CSIS",
"enable_validation",
"is_validation_enabled",
"ELBO",
"Effect_ELBO",
"EmpiricalMarginal",
"EnergyDistance",
"GuideMessenger",
"HMC",
"Importance",
"IMQSteinKernel",
"infer_discrete",
"Importance",
"JitEffect_ELBO",
"JitTraceEnum_ELBO",
"JitTraceGraph_ELBO",
"JitTraceMeanField_ELBO",
Expand All @@ -51,13 +51,17 @@
"SMCFilter",
"SVGD",
"SVI",
"TraceTMC_ELBO",
"TraceEnum_ELBO",
"TraceGraph_ELBO",
"TraceMeanField_ELBO",
"TracePosterior",
"TracePredictive",
"TraceTMC_ELBO",
"TraceTailAdaptive_ELBO",
"Trace_ELBO",
"Trace_MMD",
"config_enumerate",
"enable_validation",
"infer_discrete",
"is_validation_enabled",
]
8 changes: 8 additions & 0 deletions pyro/infer/autoguide/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0

from pyro.infer.autoguide.effect import (
AutoMessenger,
AutoNormalMessenger,
AutoRegressiveMessenger,
)
from pyro.infer.autoguide.gaussian import AutoGaussian
from pyro.infer.autoguide.guides import (
AutoCallable,
Expand Down Expand Up @@ -41,9 +46,12 @@
"AutoIAFNormal",
"AutoLaplaceApproximation",
"AutoLowRankMultivariateNormal",
"AutoMessenger",
"AutoMultivariateNormal",
"AutoNormal",
"AutoNormalMessenger",
"AutoNormalizingFlow",
"AutoRegressiveMessenger",
"AutoStructured",
"init_to_feasible",
"init_to_generated",
Expand Down
Loading