diff --git a/python/paddle/fluid/layers/detection.py b/python/paddle/fluid/layers/detection.py index b629f54d512af7f357fe95c88b479a97ae9ee458..63d8bd4dc7c9e51968036c357fe1cdfc9bfff60c 100644 --- a/python/paddle/fluid/layers/detection.py +++ b/python/paddle/fluid/layers/detection.py @@ -2010,9 +2010,10 @@ def box_clip(input, im_info, name=None): output = helper.create_variable_for_type_inference(dtype=input.dtype) inputs = {"Input": input, "ImInfo": im_info} helper.append_op(type="box_clip", inputs=inputs, outputs={"Output": output}) - + return output + def multiclass_nms(bboxes, scores, score_threshold, diff --git a/python/paddle/fluid/tests/test_detection.py b/python/paddle/fluid/tests/test_detection.py index 3eab9b99e2cc9f5b352182fe9259eee9d4378ead..5e21dda9679eec3cffafe7d448ebb71cd5e06f57 100644 --- a/python/paddle/fluid/tests/test_detection.py +++ b/python/paddle/fluid/tests/test_detection.py @@ -479,6 +479,7 @@ class TestBoxClip(unittest.TestCase): out = layers.box_clip(input_box, im_info) self.assertIsNotNone(out) + class TestMulticlassNMS(unittest.TestCase): def test_multiclass_nms(self): program = Program()