-
Notifications
You must be signed in to change notification settings - Fork 777
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
[Docathon][Update Doc No.22、24-26、30、32、34] remove the related files,update program.rst and program_en.rst #7085
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7085.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
IfElse | ||
====== | ||
|
||
条件分支,允许对同一个 batch 的输入,根据给定的条件,分别选择 :code:`true_block` 或 :code:`false_block` 中的逻辑进行执行,执行完成之后再将两个分支的输出合并为同一个输出。通常,条件表达式可由 :ref:`cn_api_fluid_layers_less_than`, :ref:`cn_api_fluid_layers_equal` 等逻辑比较 API 产生。 | ||
|
||
请参考 :ref:`cn_api_fluid_layers_IfElse` | ||
|
||
**注意:** 强烈建议您使用新的 OP :ref:`cn_api_fluid_layers_cond` 而不是 ``IfElse``。:ref:`cn_api_fluid_layers_cond` 的使用方式更简单,并且调用该 OP 所用的代码更少且功能与 ``IfElse`` 一样。 | ||
|
||
Switch | ||
====== | ||
|
||
多分支选择结构,如同程序语言中常见的 :code:`switch-case` 声明, 其根据输入表达式的取值不同,选择不同的分支执行。具体来说,Fluid 所定义的 :code:`Switch` 控制流有如下特性: | ||
|
||
* case 的条件是个 bool 类型的值,即在 Program 中是一个张量类型的 Variable; | ||
* 依次检查逐个 case,选择第一个满足条件的 case 执行,完成执行后即退出所属的 block; | ||
* 如果所有 case 均不满足条件,会选择默认的 case 进行执行。 | ||
|
||
请参考 :ref:`cn_api_fluid_layers_Switch` | ||
|
||
**注意:** 强烈建议您使用新的 OP :ref:`cn_api_fluid_layers_case` 而不是 ``Switch``。 :ref:`cn_api_fluid_layers_case` 的使用方式更简单,并且调用该 OP 所用的代码更少且功能与 ``Switch`` 一样。 | ||
|
||
While | ||
===== | ||
|
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.
控制流这部分要根据最新文档做修改
https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/static/nn/switch_case_cn.html
https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/static/nn/cond_cn.html
https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/static/nn/while_loop_cn.html
下面DynamicRNN
和StaticRNN
不再需要
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.
嗨,同学好,我之前在 #7083 中说 control_flow.rst
和 sparse_update.rst
部分被其他内容引用,所以需要先修改。
其他内容没有被引用,都是个孤立的文件,那么就可以直接删除了
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.
好的好的,感谢您的回复! 那我先重新提交删除其他文件的PR,然后再去修改control_flow.rst
remove the related files
update program.rst and program_en.rst
@DrRyanHuang 和 @sunzhongkai588