From d48fa99372eeca6d44b4f366bb17c4f06939ff91 Mon Sep 17 00:00:00 2001 From: kingfo Date: Thu, 23 Apr 2020 11:49:03 +0800 Subject: [PATCH] fix error words in dynamic debugging module --- tutorials/source_en/use/debugging_in_pynative_mode.md | 2 +- tutorials/source_zh_cn/use/debugging_in_pynative_mode.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/source_en/use/debugging_in_pynative_mode.md b/tutorials/source_en/use/debugging_in_pynative_mode.md index 39f271ba..3f9ba9b5 100644 --- a/tutorials/source_en/use/debugging_in_pynative_mode.md +++ b/tutorials/source_en/use/debugging_in_pynative_mode.md @@ -143,7 +143,7 @@ print(res.asnumpy()) [3. 3. 3. 3.]] ``` -In the preceding code, the `ms_function` decorator is added before `construct` of the `TensorAddNet` class. The decorator compiles the `construct` method into a computational graph. After the input is given, the graph is delivered and executed, `F.tensor_add` in the preceding code is executed in the common PyNative mode. +In the preceding code, the `ms_function` decorator is added before `construct` of the `TensorAddNet` class. The decorator compiles the `construct` method into a computational graph. After the input is given, the graph is delivered and executed, `tensor_add` in the preceding code is executed in the common PyNative mode. It should be noted that, in a function to which the `ms_function` decorator is added, if an operator (such as `pooling` or `tensor_add`) that does not need parameter training is included, the operator can be directly called in the decorated function, as shown in the following example: diff --git a/tutorials/source_zh_cn/use/debugging_in_pynative_mode.md b/tutorials/source_zh_cn/use/debugging_in_pynative_mode.md index 3ffdb8cb..9a9e9e67 100644 --- a/tutorials/source_zh_cn/use/debugging_in_pynative_mode.md +++ b/tutorials/source_zh_cn/use/debugging_in_pynative_mode.md @@ -143,7 +143,7 @@ print(res.asnumpy()) [3. 3. 3. 3.]] ``` -上述示例代码中,在`TensorAddNet`类的`construct`之前加装了`ms_function`装饰器,该装饰器会将`construct`方法编译成计算图,在给定输入之后,以图的形式下发执行,而上一示例代码中的`F.tensor_add`会直以普通的PyNative的方式执行。 +上述示例代码中,在`TensorAddNet`类的`construct`之前加装了`ms_function`装饰器,该装饰器会将`construct`方法编译成计算图,在给定输入之后,以图的形式下发执行,而上一示例代码中的`tensor_add`会直接以普通的PyNative的方式执行。 需要说明的是,加装了`ms_function`装饰器的函数中,如果包含不需要进行参数训练的算子(如`pooling`、`tensor_add`等算子),则这些算子可以在被装饰的函数中直接调用,如下例所示。 -- GitLab