From 3bf998efbc574001c66e7337609caa43954e7f61 Mon Sep 17 00:00:00 2001 From: lyuwenyu Date: Tue, 24 Aug 2021 12:09:24 +0800 Subject: [PATCH] add repr --- python/paddle/vision/ops.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/paddle/vision/ops.py b/python/paddle/vision/ops.py index abab4e71cbf32..ef2eee761ffbe 100644 --- a/python/paddle/vision/ops.py +++ b/python/paddle/vision/ops.py @@ -1024,3 +1024,7 @@ def forward(self, input, boxes, boxes_num=None): output_size=self._output_size, spatial_scale=self._spatial_scale, boxes_num=boxes_num) + + def extra_repr(self): + main_str = 'output_size={_output_size}, spatial_scale={_spatial_scale}' + return main_str.format(**self.__dict__)