diff --git a/paddle/fluid/operators/roi_align_op.cc b/paddle/fluid/operators/roi_align_op.cc index 12d83f2e51721e09c2478760c125bbeed7459d7e..2287b2146016cc29af2346375ff6515174587898 100644 --- a/paddle/fluid/operators/roi_align_op.cc +++ b/paddle/fluid/operators/roi_align_op.cc @@ -132,7 +132,20 @@ class ROIAlignOpMaker : public framework::OpProtoAndCheckerMaker { "and pooled_w, likewise for height") .SetDefault(-1); AddComment(R"DOC( - +**RoIAlign Operator** + +Region of interest align (also known as RoI align) is to perform +bilinear interpolation on inputs of nonuniform sizes to obtain +fixed-size feature maps (e.g. 7*7) + +Dividing each region proposal into equal-sized sections with +the pooled_width and pooled_height. Location remains the origin +result. + +In each ROI bin, the value of the four regularly sampled locations +are computed directly through bilinear interpolation. The output is +the mean of four locations. +Thus avoid the misaligned problem. )DOC"); } }; diff --git a/python/paddle/fluid/tests/unittests/test_roi_align_op.py b/python/paddle/fluid/tests/unittests/test_roi_align_op.py index 1028d38759bddf7c0f5337f3a2fc3c87e9a48c32..1a252ea547e4d93d83f64fa9cdb3605eeef0a3cf 100644 --- a/python/paddle/fluid/tests/unittests/test_roi_align_op.py +++ b/python/paddle/fluid/tests/unittests/test_roi_align_op.py @@ -167,4 +167,4 @@ class TestROIAlignOp(OpTest): self.check_output() def test_check_grad(self): - self.check_grad(['X'], 'Out', max_relative_error=0.005) + self.check_grad(['X'], 'Out')