MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / currentMap

Method currentMap

dependency/densecrf/src/densecrf.cpp:202–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200 expAndNormalize( Q, tmp1 );
201}
202VectorXs DenseCRF::currentMap( const MatrixXf & Q ) const{
203 VectorXs r(Q.cols());
204 // Find the map
205 for( int i=0; i<N_; i++ ){
206 int m;
207 Q.col(i).maxCoeff( &m );
208 r[i] = m;
209 }
210 return r;
211}
212
213// Compute the KL-divergence of a set of marginals
214double DenseCRF::klDivergence( const MatrixXf & Q ) const {

Callers 1

dense_crf_wrapperFunction · 0.45

Calls 3

colsMethod · 0.45
maxCoeffMethod · 0.45
colMethod · 0.45

Tested by

no test coverage detected