From 8be0a081adfe3c530e8fc7b4ecdaa6fcb9f708a2 Mon Sep 17 00:00:00 2001 From: chujinjin Date: Sat, 28 Jan 2023 10:44:48 +0800 Subject: [PATCH] change default mode --- docs/api/api_python/mindspore/mindspore.set_context.rst | 2 +- mindspore/python/mindspore/context.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/api_python/mindspore/mindspore.set_context.rst b/docs/api/api_python/mindspore/mindspore.set_context.rst index 3f1111fcc02..60e22583cd5 100644 --- a/docs/api/api_python/mindspore/mindspore.set_context.rst +++ b/docs/api/api_python/mindspore/mindspore.set_context.rst @@ -8,7 +8,7 @@ mindspore.set_context 在运行程序之前,应配置context。如果没有配置,默认情况下将根据设备目标进行自动设置。 .. note:: - 设置属性时,必须输入属性名称。net初始化后不建议更改模式,因为一些操作的实现在Graph模式和PyNative模式下是不同的。默认值:GRAPH_MODE。 + 设置属性时,必须输入属性名称。net初始化后不建议更改模式,因为一些操作的实现在Graph模式和PyNative模式下是不同的。默认值:PYNATIVE_MODE。 某些配置适用于特定的设备,有关详细信息,请参见下表: diff --git a/mindspore/python/mindspore/context.py b/mindspore/python/mindspore/context.py index b58ff401846..c3fd0c193be 100644 --- a/mindspore/python/mindspore/context.py +++ b/mindspore/python/mindspore/context.py @@ -722,7 +722,7 @@ def set_context(**kwargs): Note: Attribute name is required for setting attributes. The mode is not recommended to be changed after net was initialized because the implementations of some - operations are different in graph mode and pynative mode. Default: GRAPH_MODE. + operations are different in graph mode and pynative mode. Default: PYNATIVE_MODE. Some configurations are device specific, see the below table for details: