From 87bfc7068173440d05dc682dba00bb99514317ba Mon Sep 17 00:00:00 2001 From: yuzhenhua Date: Wed, 7 Dec 2022 09:43:53 +0800 Subject: [PATCH] for rewrite doc --- docs/api/api_python/mindspore.rewrite.rst | 4 ++++ docs/api/api_python_en/mindspore.rewrite.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/api/api_python/mindspore.rewrite.rst b/docs/api/api_python/mindspore.rewrite.rst index 0442931a108..c0f30d859cc 100644 --- a/docs/api/api_python/mindspore.rewrite.rst +++ b/docs/api/api_python/mindspore.rewrite.rst @@ -2,6 +2,10 @@ mindspore.rewrite ================= MindSpore的ReWrite功能用于修改网络前向的计算过程,对网络进行插入、删除和替换语句。该功能目前处于开发调试阶段,可能会更改或删除。 +ReWrite完整示例请参考 +`rewrite_example.py `_ 。 +该样例代码的主要功能包括:怎么通过网络创建SymbolTree,并且对SymbolTree中的节点进行插入删除替换等操作,其中还包含了对子网络的修改和通过模式匹配进行节点替换。 + .. py:class:: mindspore.rewrite.SymbolTree(handler: SymbolTreeImpl) SymbolTree通常对应于网络的前向计算过程。 diff --git a/docs/api/api_python_en/mindspore.rewrite.rst b/docs/api/api_python_en/mindspore.rewrite.rst index 519fa4dcf72..20afeb751d9 100644 --- a/docs/api/api_python_en/mindspore.rewrite.rst +++ b/docs/api/api_python_en/mindspore.rewrite.rst @@ -1,5 +1,9 @@ mindspore.rewrite ================= +For a complete ReWrite example, refer to +`rewrite_example.py `_ 。 +The main functions of the sample code include: how to create a SymbolTree through the network, and how to insert, delete, and replace the nodes in the SymbolTree. It also includes the modification of the subnet and node replacement through pattern matching. + .. automodule:: mindspore.rewrite :members: \ No newline at end of file