Move the location of annotation

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12969

Differential Revision: D10560824

Pulled By: ezyang

fbshipit-source-id: 86c21149682db5ebfd9610df9e9845688a3db3b0
This commit is contained in:
103yiran 2018-10-24 12:33:02 -07:00 committed by Facebook Github Bot
parent fcf801f061
commit 0a190c8869

View file

@ -130,6 +130,7 @@ __global__ void PSRoIPoolForward(
T bin_size_h = roi_height / static_cast<T>(pooled_height);
T bin_size_w = roi_width / static_cast<T>(pooled_width);
// Add roi offsets and clip to input boundaries
int hstart = floor(
static_cast<T>(ph) * bin_size_h + roi_start_h);
int wstart = floor(
@ -138,7 +139,7 @@ __global__ void PSRoIPoolForward(
static_cast<T>(ph + 1) * bin_size_h + roi_start_h);
int wend = ceil(
static_cast<T>(pw + 1) * bin_size_w + roi_start_w);
// Add roi offsets and clip to input boundaries
hstart = min(max(hstart, 0), height);
hend = min(max(hend, 0), height);
wstart = min(max(wstart, 0),width);