Skip to content

Commit

Permalink
Move the location of annotation
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#12969

Differential Revision: D10560824

Pulled By: ezyang

fbshipit-source-id: 86c21149682db5ebfd9610df9e9845688a3db3b0
  • Loading branch information
103yiran authored and facebook-github-bot committed Oct 24, 2018
1 parent fcf801f commit 0a190c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/detectron/ps_roi_pool_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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);
Expand Down

0 comments on commit 0a190c8

Please sign in to comment.