Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
add shape check when position_sensitive is true
Browse files Browse the repository at this point in the history
  • Loading branch information
shesung committed Dec 27, 2018
1 parent 9490fdb commit 7340f14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/operator/contrib/roi_align.cc
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ He, Kaiming, et al. "Mask R-CNN." ICCV, 2017
out_shape->clear();
if (param.position_sensitive) {
out_shape->push_back(
CHECK_EQ(dshape[1] % (param.pooled_size[0]*param.pooled_size[1]), 0) <<
"Input channels shuold be divided by pooled_size[0]*pooled_size[1]";
Shape4(bshape[0], dshape[1]/param.pooled_size[0]/param.pooled_size[1],
param.pooled_size[0], param.pooled_size[1]));
} else {
Expand Down

0 comments on commit 7340f14

Please sign in to comment.