From 9c112100f492848419a58d1d2b0898df45af0371 Mon Sep 17 00:00:00 2001 From: huanxiaoling <3174348550@qq.com> Date: Wed, 7 Dec 2022 10:17:09 +0800 Subject: [PATCH] correct the format of files --- tutorials/source_en/advanced/compute_graph.md | 2 +- tutorials/source_zh_cn/advanced/compute_graph.ipynb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/source_en/advanced/compute_graph.md b/tutorials/source_en/advanced/compute_graph.md index 06d16ab624..eabaee8100 100644 --- a/tutorials/source_en/advanced/compute_graph.md +++ b/tutorials/source_en/advanced/compute_graph.md @@ -83,7 +83,7 @@ In static graph mode, MindSpore converts Python source code into Intermediate Re MindSpore static graph execution process actually consists of two steps, corresponding to the Define and Run phases of the static graph. However, in practice, it is not sensed when the instantiated Cell object is called. MindSpore encapsulates both phases in the `__call__` method of the Cell, so the actual calling process is as follows: -> `model(inputs) = model.compile(inputs) + model.construct(inputs)`, where `model` is the instantiated Cell object. +`model(inputs) = model.compile(inputs) + model.construct(inputs)`, where `model` is the instantiated Cell object. We call the `compile` method explicitly for the following example: diff --git a/tutorials/source_zh_cn/advanced/compute_graph.ipynb b/tutorials/source_zh_cn/advanced/compute_graph.ipynb index 057cbc1730..ca2d1ae40a 100644 --- a/tutorials/source_zh_cn/advanced/compute_graph.ipynb +++ b/tutorials/source_zh_cn/advanced/compute_graph.ipynb @@ -164,9 +164,9 @@ "\n", "在静态图模式下,MindSpore通过源码转换的方式,将Python的源码转换成中间表达IR(Intermediate Representation),并在此基础上对IR图进行优化,最终在硬件设备上执行优化后的图。MindSpore使用基于图表示的函数式IR,称为MindIR,详情可参考[中间表示MindIR](https://www.mindspore.cn/docs/zh-CN/master/design/mindir.html)。\n", "\n", - "MindSpore的静态图执行过程实际包含两步,对应静态图的Define和Run阶段,但在实际使用中,在实例化的Cell对象被调用时并不会感知,MindSpore将两阶段均封装在Cell的`__call__`方法中,因此实际调用过程如下:\n", + "MindSpore的静态图执行过程实际包含两步,对应静态图的Define和Run阶段,但在实际使用中,在实例化的Cell对象被调用时并不会感知,MindSpore将两阶段均封装在Cell的`__call__`方法中,因此实际调用过程为:\n", "\n", - "> `model(inputs) = model.compile(inputs) + model.construct(inputs)`,其中`model`为实例化Cell对象。\n", + "`model(inputs) = model.compile(inputs) + model.construct(inputs)`,其中`model`为实例化Cell对象。\n", "\n", "下面我们显式调用`compile`方法进行示例:" ] -- Gitee