提交 639d78f8 编写于 作者: C cc 提交者: GitHub

Replace std::log2 with log2 for support gnustl, test=develop (#3276)

上级 50152b80
...@@ -71,8 +71,8 @@ void DistributeFpnProposalsCompute::Run() { ...@@ -71,8 +71,8 @@ void DistributeFpnProposalsCompute::Run() {
for (int j = 0; j < fpn_rois_slice.dims()[0]; ++j) { for (int j = 0; j < fpn_rois_slice.dims()[0]; ++j) {
// get the target level of current rois // get the target level of current rois
float roi_scale = std::sqrt(BBoxArea(rois_data, false)); float roi_scale = std::sqrt(BBoxArea(rois_data, false));
int tgt_lvl = std::floor( int tgt_lvl =
std::log2(roi_scale / refer_scale + static_cast<float>(1e-6)) + std::floor(log2(roi_scale / refer_scale + static_cast<float>(1e-6)) +
refer_level); refer_level);
tgt_lvl = std::min(max_level, std::max(tgt_lvl, min_level)); tgt_lvl = std::min(max_level, std::max(tgt_lvl, min_level));
target_level.push_back(tgt_lvl); target_level.push_back(tgt_lvl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册