提交 ddd3c151 编写于 作者: B baiyfbupt

bug fix

上级 4fef6029
...@@ -53,18 +53,18 @@ __global__ void GPUROIPoolForward( ...@@ -53,18 +53,18 @@ __global__ void GPUROIPoolForward(
int roi_width = max(roi_end_w - roi_start_w + 1, 1); int roi_width = max(roi_end_w - roi_start_w + 1, 1);
int roi_height = max(roi_end_h - roi_start_h + 1, 1); int roi_height = max(roi_end_h - roi_start_h + 1, 1);
int hstart = int hstart = static_cast<int>(floor(static_cast<double>(ph) *
static_cast<int>(floor(static_cast<T>(ph) * static_cast<T>(roi_height) / static_cast<double>(roi_height) /
static_cast<T>(pooled_height))); static_cast<double>(pooled_height)));
int wstart = int wstart = static_cast<int>(floor(static_cast<double>(pw) *
static_cast<int>(floor(static_cast<T>(pw) * static_cast<T>(roi_width) / static_cast<double>(roi_width) /
static_cast<T>(pooled_width))); static_cast<double>(pooled_width)));
int hend = static_cast<int>(ceil(static_cast<T>(ph + 1) * int hend = static_cast<int>(ceil(static_cast<double>(ph + 1) *
static_cast<T>(roi_height) / static_cast<double>(roi_height) /
static_cast<T>(pooled_height))); static_cast<double>(pooled_height)));
int wend = static_cast<int>(ceil(static_cast<T>(pw + 1) * int wend = static_cast<int>(ceil(static_cast<double>(pw + 1) *
static_cast<T>(roi_width) / static_cast<double>(roi_width) /
static_cast<T>(pooled_width))); static_cast<double>(pooled_width)));
hstart = min(max(hstart + roi_start_h, 0), height); hstart = min(max(hstart + roi_start_h, 0), height);
hend = min(max(hend + roi_start_h, 0), height); hend = min(max(hend + roi_start_h, 0), height);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册