Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cn docs of paddle.vision.transforms.Normalize, paddle.vision.models.alexnet, paddle.vision.models.mobilenet, ops apis #4704

Merged
merged 32 commits into from
Jun 17, 2022

Conversation

Liyulingyue
Copy link
Contributor

@Liyulingyue Liyulingyue commented Apr 28, 2022

  1. 添加参数
  2. 使用copy-from

PADDLEPADDLE_PR=42380

PaddlePaddle/Paddle#42380

@paddle-bot-old
Copy link

Thanks for your contribution!

@Liyulingyue Liyulingyue changed the title fix cn docs of paddle.vision.transforms.Normalize fix cn docs of paddle.vision.transforms.Normalize and paddle.vision.models.alexnet Apr 29, 2022
- to_rgb (bool, optional) - 是否转换为 ``rgb`` 的格式。默认值:False。
- data_format (str, 可选): 数据的格式,必须为 'HWC' 或 'CHW'。 默认为'CHW'。
- to_rgb (bool, 可选) - 是否转换为 ``rgb`` 的格式。默认为False。
- keys (list[str]|tuple[str], 可选) – 与BaseTransform相同. 默认为None.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意中英文标点符号不要混用

@Liyulingyue Liyulingyue changed the title fix cn docs of paddle.vision.transforms.Normalize and paddle.vision.models.alexnet fix cn docs of paddle.vision.transforms.Normalize, paddle.vision.models.alexnet, paddle.vision.models.mobilenet, ops apis May 18, 2022
@@ -5,6 +5,8 @@ MobileNetV1

.. py:class:: paddle.vision.models.MobileNetV1(scale=1.0, num_classes=1000, with_pool=True)



MobileNetV1模型,来自论文 `"MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications" <https://arxiv.org/abs/1704.04861>`_ 。

参数
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

num_classes:, -->

@@ -5,6 +5,8 @@ MobileNetV2

.. py:class:: paddle.vision.models.MobileNetV2(scale=1.0, num_classes=1000, with_pool=True)



MobileNetV2模型,来自论文 `"MobileNetV2: Inverted Residuals and Linear Bottlenecks" <https://arxiv.org/abs/1801.04381>`_ 。

参数
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

num_classes:, -->

@@ -5,6 +5,8 @@ VGG

.. py:class:: paddle.vision.models.VGG(features, num_classes=1000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要把with_pool=True也加上

@@ -5,6 +5,8 @@ VGG

.. py:class:: paddle.vision.models.VGG(features, num_classes=1000)



VGG模型,来自论文 `"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_ 。

参数
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • num_classes (int,可选) ,int, 后面多一个空格
  • with_pool 后面多一个:

@@ -5,6 +5,7 @@ alexnet

.. py:function:: paddle.vision.models.alexnet(pretrained=False, **kwargs)


AlexNet模型,来自论文 `"ImageNet Classification with Deep Convolutional Neural Networks" <https://papers.nips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf>`_ 。

参数
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参数是不是少了 **kwargs

@@ -25,13 +25,4 @@ PSRoIPool

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spatial_scale是可选参数

@@ -24,12 +24,4 @@ PSROIPooling由R-FCN提出。更多详细信息,请参阅 https://arxiv.org/ab

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中英文标点符号不要混用:

  • , -->
  • . -->
    spatial_scale是可选参数

@@ -15,7 +15,8 @@ RoI Align是在指定输入的感兴趣区域上执行双线性插值以获得
- boxes (Tensor) - 待执行池化的RoIs(Regions of Interest)的框坐标。它应当是一个形状为(boxes_num, 4)的2-D Tensor,以[[x1, y1, x2, y2], ...]的形式给出。其中(x1, y1)是左上角的坐标值,(x2, y2)是右下角的坐标值。
- boxes_num (Tensor) - 该batch中每一张图所包含的框数量。数据类型为int32。
- output_size (int|Tuple(int, int)) - 池化后输出的尺寸(H, W),数据类型为int32。如果output_size是单个int类型整数,则H和W都与其相等。
- spatial_scale (float,可选) - 空间比例因子,用于将boxes中的坐标从其输入尺寸按比例映射到input特征图的尺寸。
- spatial_scale (float32) - 空间比例因子,用于将boxes中的坐标从其输入尺寸按比例映射到input特征图的尺寸。
- sampling_ratio (int32) – 插值网格中用于计算每个池化输出条柱的输出值的采样点数。如果大于0,则使用每个条柱的精确采样点。如果小于或等于0,则使用自适应数量的网格点(计算为 ``ceil(roi_width / output_width)``,高度同理)。默认值:-1。
- aligned (bool,可选)- 默认值为True,表示像素移动框将其坐标移动-0.5,以便与两个相邻像素索引更好地对齐。如果为False,则是使用遗留版本的实现。
- name (str,可选)- 默认值为None。一般用户无需设置,具体用法请参见 :ref:`api_guide_Name`。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 参数整体需要加粗
  • 注意中英文标点符号不要混用
  • 中英文字符之间最好空一格
  • 注意参数是否可选

- to_rgb (bool, optional) - 是否转换为 ``rgb`` 的格式。默认值:False。
- data_format (str,可选): 数据的格式,必须为 'HWC' 或 'CHW'。 默认为'CHW'。
- to_rgb (bool,可选) - 是否转换为 ``rgb`` 的格式。默认为False。
- keys (list[str]|tuple[str],可选) – 与BaseTransform相同。默认为None。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 所有参数都需要加粗
  • 注意参数是否可选,optional --> 可选
  • 中英文字符之间最好加一个空格

@SigureMo SigureMo mentioned this pull request Jun 16, 2022
17 tasks
@Ligoml Ligoml merged commit 812f141 into PaddlePaddle:develop Jun 17, 2022
@Liyulingyue Liyulingyue deleted the for_Normalize branch September 3, 2022 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants