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

Function expAndNormalize

dependency/densecrf3d/src/densecrf.cpp:193–201  ·  view source on GitHub ↗

////////////////// Inference ///// //////////////////

Source from the content-addressed store, hash-verified

191///// Inference /////
192///////////////////////
193void expAndNormalize ( MatrixXf & out, const MatrixXf & in ) {
194 out.resize( in.rows(), in.cols() );
195 for( int i=0; i<out.cols(); i++ ){
196 VectorXf b = in.col(i);
197 b.array() -= b.maxCoeff();
198 b = b.array().exp();
199 out.col(i) = b / b.array().sum();
200 }
201}
202void sumAndNormalize( MatrixXf & out, const MatrixXf & in, const MatrixXf & Q ) {
203 out.resize( in.rows(), in.cols() );
204 for( int i=0; i<in.cols(); i++ ){

Callers 4

inferenceMethod · 0.70
startInferenceMethod · 0.70
stepInferenceMethod · 0.70
gradientMethod · 0.70

Calls 7

resizeMethod · 0.45
rowsMethod · 0.45
colsMethod · 0.45
colMethod · 0.45
arrayMethod · 0.45
maxCoeffMethod · 0.45
sumMethod · 0.45

Tested by

no test coverage detected