Minipyro

Mini Pyro

This file contains a minimal implementation of the Pyro Probabilistic Programming Language. The API (method signatures, etc.) match that of the full implementation as closely as possible. This file is independent of the rest of Pyro, with the exception of the pyro.distributions module.

An accompanying example that makes use of this implementation can be found at examples/minipyro.py.

class Adam(optim_args)[source]

Bases: object

__call__(params)[source]
class JitTrace_ELBO(**kwargs)[source]

Bases: object

__call__(model, guide, *args)[source]
class Messenger(fn=None)[source]

Bases: object

__call__(*args, **kwargs)[source]
postprocess_message(msg)[source]
process_message(msg)[source]
class PlateMessenger(fn, size, dim)[source]

Bases: pyro.contrib.minipyro.Messenger

process_message(msg)[source]
class SVI(model, guide, optim, loss)[source]

Bases: object

step(*args, **kwargs)[source]
Trace_ELBO(**kwargs)[source]
apply_stack(msg)[source]
class block(fn=None, hide_fn=<function block.<lambda>>)[source]

Bases: pyro.contrib.minipyro.Messenger

process_message(msg)[source]
elbo(model, guide, *args, **kwargs)[source]
get_param_store()[source]
param(name, init_value=None, constraint=Real(), event_dim=None)[source]
plate(name, size, dim=None)[source]
class replay(fn, guide_trace)[source]

Bases: pyro.contrib.minipyro.Messenger

process_message(msg)[source]
sample(name, fn, *args, **kwargs)[source]
class seed(fn=None, rng_seed=None)[source]

Bases: pyro.contrib.minipyro.Messenger

class trace(fn=None)[source]

Bases: pyro.contrib.minipyro.Messenger

get_trace(*args, **kwargs)[source]
postprocess_message(msg)[source]