From 4c9884e7135cad6768e425a2c6f5a369e6af44cd Mon Sep 17 00:00:00 2001 From: jerrywgz Date: Wed, 17 Oct 2018 03:27:45 +0000 Subject: [PATCH] refine unittest test=develop --- paddle/fluid/operators/roi_align_op.cc | 15 ++++++++++++++- .../fluid/tests/unittests/test_roi_align_op.py | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/roi_align_op.cc b/paddle/fluid/operators/roi_align_op.cc index 12d83f2e517..2287b214601 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 1028d38759b..1a252ea547e 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') -- GitLab