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

Function sumAndNormalize

dependency/densecrf/src/densecrf.cpp:107–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 }
106}
107void sumAndNormalize( MatrixXf & out, const MatrixXf & in, const MatrixXf & Q ) {
108 out.resize( in.rows(), in.cols() );
109 for( int i=0; i<in.cols(); i++ ){
110 VectorXf b = in.col(i);
111 VectorXf q = Q.col(i);
112 out.col(i) = b.array().sum()*q - b;
113 }
114}
115MatrixXf DenseCRF::inference ( int n_iterations ) const {
116 MatrixXf Q( M_, N_ ), tmp1, unary( M_, N_ ), tmp2;
117 unary.fill(0);

Callers 1

gradientMethod · 0.70

Calls 6

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

Tested by

no test coverage detected