Skip to content

Conversation

@zhangyk0314
Copy link
Contributor

增加ResNetBasicBlock API接口的文档。

related pr: PaddlePaddle/Paddle#44171

@paddle-bot
Copy link

paddle-bot bot commented Jul 13, 2022

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5074.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:[Beta]飞桨文档预览工具

@zhangyk0314 zhangyk0314 force-pushed the resnet_basic_block branch 4 times, most recently from a1e6ca8 to 2aa2d41 Compare July 14, 2022 03:08
Copy link
Contributor

@qili93 qili93 left a comment

Choose a reason for hiding this comment

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

LGTM

@Ligoml
Copy link
Collaborator

Ligoml commented Jul 26, 2022

首先,英文文档需要好好修改一下,虽然已经合入了,但是官网预览存在很大问题,详见:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/incubate/xpu/resnet_block/ResNetBasicBlock_en.html

其次,中英文文档的目录层级不一致,英文文档比中文多一个目录层级,需要统一,另外中文文档有一些缺失,建议补充

- **scale_attr** (ParamAttr,可选) - 指定对应 ``BatchNorm`` 权重参数属性的对象。默认值为None,表示使用默认的权重参数属性。具体用法请参见 :ref:`cn_api_fluid_ParamAttr` 。
- **bias_attr** (ParamAttr,可选) - 指定对应 ``BatchNorm`` 偏置参数属性的对象。默认值为None,表示使用默认的偏置参数属性。具体用法请参见 :ref:`cn_api_fluid_ParamAttr` 。
- **moving_mean_name** (str,可选) - ``moving_mean`` 的名称,存储全局均值。默认值:None。
- **moving_var_name** (string,可选) - ``moving_var`` 的名称,存储全局方差。默认值:None。
Copy link
Collaborator

Choose a reason for hiding this comment

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

image

str和string建议统一一下,用str吧



代码示例
::::::::::
Copy link
Collaborator

Choose a reason for hiding this comment

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

中文文档使用COPY-FROM的方式,和英文对齐

ch_in = 4
ch_out = 8
x_data = np.random.random(size=(2, ch_in, 16, 16)).astype('float32')
x = paddle.to_tensor(x_data)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里生成输入数据可以直接使用paddle的api,不需要另外引入numpy

Copy link
Collaborator

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

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

LGTM for docs

@Ligoml Ligoml merged commit 9009c07 into PaddlePaddle:develop Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants