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

Function gradCheck

dependency/densecrf/src/optimization.cpp:121–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 return r;
120}
121double gradCheck( EnergyFunction & efun, const VectorXf & x, float EPS ) {
122 VectorXf ng = numericGradient( efun, x, EPS );
123 VectorXf g( x.rows() );
124 efun.gradient( x, g );
125 return (ng-g).norm();
126}
127
128VectorXf computeFunction( EnergyFunction & efun, const VectorXf & x, const VectorXf & dx, int n_samples ) {
129 VectorXf r( n_samples );

Callers 2

mainFunction · 0.50
mainFunction · 0.50

Calls 4

numericGradientFunction · 0.70
rowsMethod · 0.45
gradientMethod · 0.45
normMethod · 0.45

Tested by 2

mainFunction · 0.40
mainFunction · 0.40