diff --git a/tutorials/source_en/advanced/compute_graph.md b/tutorials/source_en/advanced/compute_graph.md index 06d16ab62418780aac127cc0587f752e63de2541..eabaee8100c37544bae9a51a6f64a2f0a0cd943c 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 057cbc17307c34eb01b831ddf5a437c23c804a48..ca2d1ae40a2f24f69be32a7b010edaad0f8d4adc 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`方法进行示例:" ]