-
Notifications
You must be signed in to change notification settings - Fork 767
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
apply(fn) my_layer #6316
apply(fn) my_layer #6316
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6316.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
这是哪里错了?有点没明白 |
@sunzhongkai588 孙哥看下? |
**返回** | ||
无 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**返回** | |
无 |
这段可以删掉
|
||
COPY-FROM: paddle.nn.Layer | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下面还是加上“方法”,因为以下都是方法而不是参数
方法 | |
:::::::::::: |
docs/api/paddle/nn/Layer_cn.rst
Outdated
@@ -10,14 +10,20 @@ Layer | |||
|
|||
基于 OOD 实现的动态图 Layer,包含该 Layer 的参数、前序运行的结构等信息。 | |||
|
|||
参数 | |||
**参数** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用加粗,因为下面的 ::::::::::::
已经能让“参数”显示成一个标题
docs/api/paddle/nn/Layer_cn.rst
Outdated
|
||
**参数** | ||
|
||
**fn** (function) - 该函数被应用带每一个子层中 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**fn** (function) - 该函数被应用带每一个子层中 | |
- **fn** (function) - 应用到每一个子层的函数 |
@@ -421,6 +442,7 @@ astype(dtype=None) | |||
返回类型:Layer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面的typo也顺手修改一下,把
astype(dtype=None)
:::::::::
修改成
astype(dtype=None)
'''''''''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一些细节修改一下~
docs/api/paddle/nn/Layer_cn.rst
Outdated
|
||
**参数** | ||
|
||
-**fn** (function) - 应用到每一个子层的函数 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-**fn** (function) - 应用到每一个子层的函数 | |
- **fn** (function) - 应用到每一个子层的函数 |
docs/api/paddle/nn/Layer_cn.rst
Outdated
''''''''' | ||
将一个函数 fn 递归地应用到网络的每一个子层(即在函数的 ``.sublayers()`` 中返回的子层)以及模块自身。该方法通常用来初始化一个模型中的参数。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''''''''' | |
将一个函数 fn 递归地应用到网络的每一个子层(即在函数的 ``.sublayers()`` 中返回的子层)以及模块自身。该方法通常用来初始化一个模型中的参数。 | |
''''''''' | |
将一个函数 fn 递归地应用到网络的每一个子层(即在函数的 ``.sublayers()`` 中返回的子层)以及模块自身。该方法通常用来初始化一个模型中的参数。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
bug fix
PR changes
docs
Description
apply(fn) 中文没有。
中英文源代码链接有误,如果前缀为“mylayer”少下划线。
关联问题:
PaddlePaddle/Paddle#59227 (comment)