mirror of
https://gitcode.com/gh_mirrors/ope/OpenFace.git
synced 2026-05-16 12:17:57 +00:00
Changing division to multiplication, a decent speedup.
This commit is contained in:
@@ -367,9 +367,12 @@ void im2colBiasSparseContrastNorm(const cv::Mat_<float>& input, int width, int h
|
||||
norm = 1;
|
||||
}
|
||||
|
||||
// Flip multiplication to division for speed
|
||||
norm = 1.0 / norm;
|
||||
|
||||
for (size_t x = 1; x < width*height + 1; ++x)
|
||||
{
|
||||
Mo[x] /= norm;
|
||||
Mo[x] *= norm;
|
||||
}
|
||||
|
||||
rowIdx++;
|
||||
|
||||
Reference in New Issue
Block a user