From b6b83117bdcec8d8769b21bbe82831e8f497f9b7 Mon Sep 17 00:00:00 2001 From: lyuwenyu Date: Tue, 24 Aug 2021 11:40:56 +0800 Subject: [PATCH] update example code --- python/paddle/vision/ops.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/vision/ops.py b/python/paddle/vision/ops.py index 55e39cac8e3ad..abab4e71cbf32 100644 --- a/python/paddle/vision/ops.py +++ b/python/paddle/vision/ops.py @@ -935,12 +935,13 @@ def roi_pool(input, Examples: .. code-block:: python import paddle + import paddle.vision.ops as ops data = paddle.rand([1, 256, 32, 32]) boxes = paddle.rand([3, 4]) boxes[:, 2] += boxes[:, 0] + 3 boxes[:, 3] += boxes[:, 1] + 4 boxes_num = paddle.to_tensor([3]).astype('int32') - pool_out = roi_pool(data, boxes, boxes_num=boxes_num, output_size=3) + pool_out = ops.roi_pool(data, boxes, boxes_num=boxes_num, output_size=3) assert pool_out.shape == [3, 256, 3, 3], '' """ check_type(output_size, 'output_size', (int, tuple), 'roi_pool')