From eba3fcf77686d9dbd86bb2502807ead292190391 Mon Sep 17 00:00:00 2001 From: YuanRisheng Date: Fri, 9 Dec 2022 03:28:33 +0000 Subject: [PATCH 1/3] test approve ,test=document_fix --- python/paddle/vision/ops.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/paddle/vision/ops.py b/python/paddle/vision/ops.py index c42bec21c6ea2..6cdaabc84513c 100755 --- a/python/paddle/vision/ops.py +++ b/python/paddle/vision/ops.py @@ -160,14 +160,14 @@ def yolo_loss( downsample_ratio (int): The downsample ratio from network input to YOLOv3 loss input, so 32, 16, 8 should be set for the first, second, and thrid YOLOv3 loss operators. - gt_score (Tensor, optional): mixup score of ground truth boxes, should be in shape + name (string): The default value is None. Normally there is no need + for user to set this property. For more information, + please refer to :ref:`api_guide_Name` + gt_score (Tensor): mixup score of ground truth boxes, should be in shape of [N, B]. Default None. - use_label_smooth (bool, optional): Whether to use label smooth. Default True. - name (str, optional): The default value is None. Normally there is no need - for user to set this property. For more information, - please refer to :ref:`api_guide_Name` - scale_x_y (float, optional): Scale the center point of decoded bounding box. - Default 1.0. + use_label_smooth (bool): Whether to use label smooth. Default True. + scale_x_y (float): Scale the center point of decoded bounding box. + Default 1.0 Returns: Tensor: A 1-D tensor with shape [N], the value of yolov3 loss From 2eb61bfa738efaef1fc401d4a064f95218b90092 Mon Sep 17 00:00:00 2001 From: YuanRisheng Date: Fri, 9 Dec 2022 06:41:26 +0000 Subject: [PATCH 2/3] test approve ,test=document_fix --- tools/check_api_yaml_same.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/check_api_yaml_same.py b/tools/check_api_yaml_same.py index 9cf56519546c5..2c05fe862ddc6 100644 --- a/tools/check_api_yaml_same.py +++ b/tools/check_api_yaml_same.py @@ -119,6 +119,23 @@ def get_yaml_diff(branch): if each_diff[0] == '-': api_delete.append(each_diff) +# remove api that doesn't modify name and args +add_exclude = [] +delete_exclude = [] +for each_add_diff in api_add: + for each_delete_diff in api_delete: + if get_api_name(each_add_diff) == get_api_name( + each_delete_diff + ) and get_api_args(each_add_diff) == get_api_args(each_delete_diff): + add_exclude.append(each_add_diff) + delete_exclude.append(each_delete_diff) + +for exclude_item in add_exclude: + api_add.remove(exclude_item) +for exclude_item in delete_exclude: + api_delete.remove(exclude_item) + + yaml_add = [] yaml_delete = [] From f0d981085166ba8a03a368700c05af2ce1060a53 Mon Sep 17 00:00:00 2001 From: YuanRisheng Date: Fri, 9 Dec 2022 08:25:54 +0000 Subject: [PATCH 3/3] test approve ,test=document_fix --- python/paddle/vision/ops.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/paddle/vision/ops.py b/python/paddle/vision/ops.py index 6cdaabc84513c..c42bec21c6ea2 100755 --- a/python/paddle/vision/ops.py +++ b/python/paddle/vision/ops.py @@ -160,14 +160,14 @@ def yolo_loss( downsample_ratio (int): The downsample ratio from network input to YOLOv3 loss input, so 32, 16, 8 should be set for the first, second, and thrid YOLOv3 loss operators. - name (string): The default value is None. Normally there is no need - for user to set this property. For more information, - please refer to :ref:`api_guide_Name` - gt_score (Tensor): mixup score of ground truth boxes, should be in shape + gt_score (Tensor, optional): mixup score of ground truth boxes, should be in shape of [N, B]. Default None. - use_label_smooth (bool): Whether to use label smooth. Default True. - scale_x_y (float): Scale the center point of decoded bounding box. - Default 1.0 + use_label_smooth (bool, optional): Whether to use label smooth. Default True. + name (str, optional): The default value is None. Normally there is no need + for user to set this property. For more information, + please refer to :ref:`api_guide_Name` + scale_x_y (float, optional): Scale the center point of decoded bounding box. + Default 1.0. Returns: Tensor: A 1-D tensor with shape [N], the value of yolov3 loss