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

[WIP] Edward 2.0 #825

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
dec2673
set rv.value() API -> rv.value
dustinvtran Jan 7, 2018
486b7e1
make {klpq,klqp,laplace,map,wake_sleep}.py,gans functional
dustinvtran Jan 8, 2018
3381070
remove edward.criticisms
dustinvtran Jan 28, 2018
bc6caaf
remove RandomVariable from ed namescope
dustinvtran Feb 5, 2018
ead535b
remove with_binary_averaging,compute_multinomial_mode
dustinvtran Jan 28, 2018
4d1a20a
remove PointMass,Empirical; use tfd.Deterministic
dustinvtran Jan 25, 2018
2e930e6
mv DirichletProcess,ParamMixture to examples/
dustinvtran Feb 2, 2018
4d063b5
remove set_seed
dustinvtran Jan 16, 2018
8546140
remove get_session
dustinvtran Jan 16, 2018
9146fba
remove Progbar
dustinvtran Jan 28, 2018
a7a306a
remove rbf
dustinvtran Jan 28, 2018
1443866
remove to_simplex
dustinvtran Jan 28, 2018
924fbf0
replace ed.dot with tensor.dot(..., [[1], [0]])
dustinvtran Jan 26, 2018
275ba71
add core with trace v1
dustinvtran Jan 7, 2018
34be6fe
move ed.random_variables to model/
dustinvtran Jan 28, 2018
9691a5b
move rv queries to models/
dustinvtran Jan 28, 2018
c92e369
extend {klpq,klqp,laplace,map,wake_sleep}.py,gans to trace
dustinvtran Jan 14, 2018
574fbac
add programmable docstrings
dustinvtran Jan 19, 2018
d3f8035
extend {gibbs,hmc,metropolis_hastings,sghmc,sgld}.py to trace
dustinvtran Jan 20, 2018
219c81c
move MCMC kernels upstream to bayesflow
dustinvtran Feb 14, 2018
8251286
appeal to Estimator API; move transform to inferences/util.py
dustinvtran Jan 28, 2018
e07789b
move get_control_variate_coef, last of edward.util
dustinvtran Feb 4, 2018
04f649b
add core with trace v2
dustinvtran Feb 2, 2018
a13b765
add core with trace v3
dustinvtran Feb 4, 2018
949eefd
update examples/
dustinvtran Jan 25, 2018
836eec2
add for cgs
dustinvtran Feb 8, 2018
d627b75
version 2.0
dustinvtran Feb 8, 2018
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
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ USER edward
ARG python_version=3.5.3-0
ARG python_qt_version=4
RUN conda install -y python=${python_version} && \
pip install observations numpy six tensorflow keras prettytensor && \
pip install observations numpy six tensorflow keras && \
pip install ipdb pytest pytest-cov python-coveralls coverage==3.7.1 pytest-xdist pep8 pytest-pep8 pydot_ng && \
conda install Pillow scikit-learn matplotlib notebook pandas seaborn pyyaml h5py && \
conda install -y pyqt=${python_qt_version} && \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-gpu
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ USER edward
# Python
ARG python_version=3.5.3-0
RUN conda install -y python=${python_version} && \
pip install observations numpy six tensorflow-gpu keras prettytensor && \
pip install observations numpy six tensorflow-gpu keras && \
pip install ipdb pytest pytest-cov python-coveralls coverage==3.7.1 pytest-xdist pep8 pytest-pep8 pydot_ng && \
conda install Pillow scikit-learn matplotlib notebook pandas seaborn pyyaml h5py && \
pip install edward && \
Expand Down
14 changes: 14 additions & 0 deletions docs/tex/bib.bib
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ @inproceedings{welling2011bayesian
year = {2011}
}

@inproceedings{wingate2011lightweight,
title={Lightweight implementations of probabilistic programming languages via transformational compilation},
author={Wingate, David and Stuhlmueller, Andreas and Goodman, Noah},
booktitle={Artificial Intelligence and Statistics},
year={2011}
}

@inproceedings{goodman2012church,
author = {Goodman, Noah and Mansinghka, Vikash and Roy, Daniel M and Bonawitz, Keith and Tenenbaum, Joshua B},
title = {{Church: a language for generative models}},
Expand Down Expand Up @@ -720,6 +727,13 @@ @article{johnson2016composing
year = {2016},
}

@inproceedings{li2016preconditioned,
title={Preconditioned Stochastic Gradient Langevin Dynamics for Deep Neural Networks.},
author={Li, Chunyuan and Chen, Changyou and Carlson, David E and Carin, Lawrence},
booktitle={Association for the Advancement of Artificial Intelligence},
year={2016}
}

@article{mohamed2016learning,
author = {Mohamed, Shakir and Lakshminarayanan, Balaji},
title = {{Learning in Implicit Generative Models}},
Expand Down
106 changes: 46 additions & 60 deletions edward/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,80 @@
from __future__ import division
from __future__ import print_function

from edward import criticisms
from edward import inferences
from edward import models
from edward import util

# Direct imports for convenience
from edward.criticisms import (
evaluate, ppc, ppc_density_plot, ppc_stat_hist_plot)
from edward.inferences import (
Inference, MonteCarlo, VariationalInference,
HMC, MetropolisHastings, SGLD, SGHMC,
KLpq, KLqp, ReparameterizationKLqp, ReparameterizationKLKLqp,
ReparameterizationEntropyKLqp, ScoreKLqp, ScoreKLKLqp, ScoreEntropyKLqp,
ScoreRBKLqp, WakeSleep, GANInference, BiGANInference, WGANInference,
ImplicitKLqp, MAP, Laplace, complete_conditional, Gibbs)
from edward.models import RandomVariable
from edward.util import (
check_data, check_latent_vars, copy, dot,
get_ancestors, get_blanket, get_children, get_control_variate_coef,
get_descendants, get_parents, get_session, get_siblings, get_variables,
is_independent, Progbar, random_variables, rbf, set_seed,
to_simplex, transform)
bigan_inference,
complete_conditional,
gan_inference,
hmc,
klpq,
klqp,
klqp_implicit,
klqp_reparameterization,
klqp_reparameterization_kl,
klqp_score,
laplace,
map,
metropolis_hastings,
sghmc,
sgld,
wake_sleep,
wgan_inference)
from edward.models import (
call_with_manipulate,
get_ancestors,
get_blanket,
get_children,
get_descendants,
get_parents,
get_siblings,
get_variables,
is_independent,
random_variables)
from edward.version import __version__, VERSION

from tensorflow.python.util.all_util import remove_undocumented

# Export modules and constants.
_allowed_symbols = [
'criticisms',
'inferences',
'models',
'util',
'evaluate',
'ppc',
'ppc_density_plot',
'ppc_stat_hist_plot',
'Inference',
'MonteCarlo',
'VariationalInference',
'HMC',
'MetropolisHastings',
'SGLD',
'SGHMC',
'KLpq',
'KLqp',
'ReparameterizationKLqp',
'ReparameterizationKLKLqp',
'ReparameterizationEntropyKLqp',
'ScoreKLqp',
'ScoreKLKLqp',
'ScoreEntropyKLqp',
'ScoreRBKLqp',
'WakeSleep',
'GANInference',
'BiGANInference',
'WGANInference',
'ImplicitKLqp',
'MAP',
'Laplace',
'bigan_inference',
'call_with_manipulate',
'complete_conditional',
'Gibbs',
'RandomVariable',
'check_data',
'check_latent_vars',
'copy',
'dot',
'gan_inference',
'hmc',
'klpq',
'klqp',
'klqp_implicit',
'klqp_reparameterization',
'klqp_reparameterization_kl',
'klqp_score',
'laplace',
'map',
'metropolis_hastings',
'sghmc',
'sgld',
'wake_sleep',
'wgan_inference',
'get_ancestors',
'get_blanket',
'get_children',
'get_control_variate_coef',
'get_descendants',
'get_parents',
'get_session',
'get_siblings',
'get_variables',
'is_independent',
'Progbar',
'random_variables',
'rbf',
'set_seed',
'to_simplex',
'transform',
'__version__',
'VERSION',
]

# Remove all extra symbols that don't have a docstring or are not explicitly
# referenced in the whitelist.
remove_undocumented(__name__, _allowed_symbols, [
criticisms, inferences, models, util
inferences, models
])
20 changes: 0 additions & 20 deletions edward/criticisms/__init__.py

This file was deleted.

Loading