未验证 提交 566ffe4d 编写于 作者: N Natalie Wolfe 提交者: GitHub

Use `Type` as cast, not constructor. (#1918)

Fixes CMU-Perceptual-Computing-Lab/openpose#1879
上级 ec374e99
......@@ -69,7 +69,7 @@ namespace op
const Type l2Dist = sqrt((Type)(vectorAToBX*vectorAToBX + vectorAToBY*vectorAToBY));
const Type threshold = sqrt((Type)(heatmapWidth*heatmapHeight))/150; // 3.3 for 368x656, 6.6 for 2x resolution
if (l2Dist < threshold)
return Type(defaultNmsThreshold+1e-6); // Without 1e-6 will not work because I use strict greater
return (Type)(defaultNmsThreshold+1e-6); // Without 1e-6 will not work because I use strict greater
}
}
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册