blei-lab / edward

A probabilistic programming language in TensorFlow. Deep generative models, variational inference.
http://edwardlib.org
Other
4.83k stars 760 forks source link

Can edward read a bayes network model? #892

Open rose1203 opened 6 years ago

rose1203 commented 6 years ago

Hi,I‘m new to Edward. I wondering whether it can read a bayes network or in what file format of bayes network can it read. THANK YOU!

palikar commented 6 years ago

Hi, "bayes networks" have nothing to do with Bayesian Neural Networks. The latter one are the models that Edward supports building. Those are almost standard Neural Networks but the wight matrices are not hard given values but rather some probability distributions that have to be sampled if one wants to evaluate the network with some input. Once such network is build, Edward can infer the parameters of the distributions for the weights. Those "trained" models can be saved with the standard Tesorflow API for saving the state of a built graph - https://www.tensorflow.org/programmers_guide/saved_model. The from Edward crated TF-session can be acquired with ed.get_session().