lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
MIT License
1.94k stars 416 forks source link

How to get the energy value #43

Open ZhangLeUestc opened 7 years ago

ZhangLeUestc commented 7 years ago

Is there a smart way to get the energy value in each/final iteration ?

lucasb-eyer commented 7 years ago

To be honest, I don't really know.

You can do a step-by-step iteration as described here in the README, there, you could look at the value of Q and at the KL(Q||P(X)), but I think both of these are not exactly what you want, you want E(X). I'm not sure what these two functions actually give you, may or may not help.