-
Notifications
You must be signed in to change notification settings - Fork 769
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
doc(): add IPU dy2static related docs. #4932
doc(): add IPU dy2static related docs. #4932
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-4932.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
|
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
identity_loss | ||
------------------------------- | ||
|
||
.. py:function:: paddle.fluid.layers.identity_loss(loss, reduction='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.
loss -> x
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.
已更改
.. py:function:: paddle.fluid.layers.identity_loss(loss, reduction='none') | ||
|
||
|
||
该OP用于在IPU动态图转静态图功能中标记网络的损失值,从而能够在IPU上为网络添加反向计算过程。该OP以网络的损失值作为输入,并对输入做reduction: |
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.
该OP
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.
已更改
参数 | ||
:::::::::::: | ||
|
||
- **reduction** (str,可选) - 指定应用于输出结果的计算方式,可选值有: ``'none'``, ``'mean'``, ``'sum'`` 。默认为 ``'none'``,直接返回输入loss的值;设置为 ``'sum'`` 时,计算输入loss的总和;设置为 ``'mean'`` 时,返回输入loss的均值。 |
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.
少了 x
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.
已添加
:::::::::::: | ||
根据 `reduction` 返回网络损失值的计算结果。 | ||
|
||
返回类型 |
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.
返回类型和 返回写在一起
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.
已更改
代码示例 | ||
:::::::::::: | ||
|
||
.. code-block:: python |
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
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.
已更改
预览的html文件(本地构建的数学公式渲染有问题) |
:::::::::::: | ||
|
||
- **x** (Variable) - 输入张量。维度为[N, \*]的多维Tensor,其中N是批大小,\*表示任何数量的附加维度。数据类型在CPU上为float32或float64,在IPU上为float16或float32。 | ||
- **reduction** (str|int,可选) - 指定应用于输出结果的计算方式,可选的string值有: ``'mean'``, ``'sum'``, ``'none'`` ,对应的int值分别为0,1,2 。默认为 ``'none'``,直接返回输入loss的值;设置为 ``'mean'`` 时,返回输入loss的均值;设置为 ``'sum'`` 时,计算输入loss的总和。 |
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.
默认为 '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.
已删除
.. py:function:: paddle.fluid.layers.identity_loss(x, reduction='none') | ||
|
||
|
||
用于在IPU动态图转静态图功能中标记网络的损失值,从而能够在IPU上为网络添加反向计算过程。该OP以网络的损失值作为输入,并对输入做reduction: |
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.
请删除 “该OP”,文档里不这么描述。
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.
已改为算子以网络的损失值作为输入
.
预览的html文件(本地构建的数学公式渲染有问题) |
增加ipu动态图转静态图新增接口的相关文档。
related pr: PaddlePaddle/Paddle#42952
文档预览链接:http://10.136.157.23:8090/documentation/docs/zh/faq/index_cn.html?reviewVersion=jenkins-doc-review-2374