Comments (13)
Unfortunately, as most of probabilistic programming libraries, we currently only support directed models. How to deal with undirected models in a general way is still an open problem for probabilistic programming.
If you are using MRFs for structured prediction, I guess deep generative models can do equally well (even much better).
from zhusuan.
Wait, what kind of markov random field are you dealing with? @cjf00000 made me realize that you can deal with continuous markov random field with zs.HMC.
from zhusuan.
@thjashin I am having a high-order discrete Markov random field that is a part of my larger model, I am now using some MCMC techniques, but it is too slow, so I am looking for some alternatives.
Because of my assumption of the joint distribution, the naive mean field and loopy belief don't have a closed form update rule, so I am looking for some other techniques.
from zhusuan.
@DanqingZ Ok, that's clear. I think there are several ways to address this problem,
- Have you heard about Perturb-and-MAP? This a trick to sample from discrete MRFs. Once you have samples, you can use EM for parameter learning.
- Alternatively you can make use of ZhSuan. You can use the Gumbel-softmax trick, or Concrete distribution (See ZhuSuan's Concrete distribution) to transform your model into a continuous MRF, and then you can use
zs.HMC
to sample from it (faster than plain Gibbs since you could work in the whole latent space and use parallel chains on GPUs).
from zhusuan.
Thanks! let me check the links.
from zhusuan.
@thjashin , what is the capacity of zhusuan with continuous MRF? Can it deal with thousands of nodes or even millions of nodes? thanks.
from zhusuan.
That really depends on whether your tuned HMC is scalable to thousands of dimensions (whether it can efficiently explores the space). I don't have much experience for this specific scene but you could give it a try first with tens of nodes to see how it works.
On the computation side, when you have large models, you may do it with a mix of Gibbs and HMC, that is, you could divide the total nodes into several groups, and use Gibbs as an outer loop, with the inner step as a HMC iteration.
from zhusuan.
Hi, Could you point me to where the continuous markov random field is used? It looks to me most of the models in the tutorial uses bayes net, which is directed.
from zhusuan.
I may write a small prototype (with two or three nodes) when I have free time. Maybe @miskcoo can help also?
from zhusuan.
@thjashin @miskcoo , sure, a small prototype, with fewer than 10 nodes, is enough for me to learn. Thanks.
from zhusuan.
@DanqingZ See #62 for a simple gaussian markov random field with 2 nodes, using HMC to sample.
from zhusuan.
@thjashin Thank you! let me check it.
from zhusuan.
Hi, @thjashin
I plan to do some unsupervised image segmentation. It seem that MRF makes sense and I'm wondering if it can be accelerated with gpu.
What do you mean by 'deep generative models'? VAE?
Could you give me some suggestions about work on unsupervised image segmentation?
from zhusuan.
Related Issues (20)
- Posterior and parameters analysis HOT 1
- questions about dlgm_nf.py HOT 1
- Can't compute prior (local_log_prob) of a StochasticTensor inside tf.scan (in LSTM cell) HOT 11
- Clarifying the * N in log_joint? HOT 4
- Dirichlet + Categorical or Dirichlet + Multinomial toy example ? HOT 5
- Collaboration with TensorLayer HOT 5
- save and restore models? HOT 4
- I have some trouble translating a model from PyMC3 HOT 4
- 请问哪里能找到zhusuan的中文文档? HOT 4
- AttributeError: module 'progressbar' has no attribute 'DataSize' HOT 1
- Why the std of y_mean is so small? HOT 7
- Memory leaks caused by VariationalObjective HOT 2
- How to use custom Hamiltonian? HOT 5
- Eager executation HOT 2
- Get logp from SGMCMC HOT 2
- module 'tensorflow' has no attribute 'make_template' HOT 1
- The examples of ‘semi_supervised_vae’ cannot run successfully HOT 1
- cant install ZhuSuan HOT 4
- AttributeError: module 'tensorflow' has no attribute 'log'
- Examples code is out dated and doesn't work with Tensorflow 2.x HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zhusuan.