From 643ea0652280a068fc8535ab0dc90e536caa1a06 Mon Sep 17 00:00:00 2001 From: liuyang_655 Date: Thu, 28 Apr 2022 05:47:44 -0400 Subject: [PATCH] modift some api note --- docs/api/api_python/mindspore/mindspore.pytype_to_dtype.rst | 6 +++++- docs/api/api_python/mindspore/mindspore.save_checkpoint.rst | 3 +-- docs/api/api_python/nn/mindspore.nn.auc.rst | 1 + mindspore/python/mindspore/train/serialization.py | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/api/api_python/mindspore/mindspore.pytype_to_dtype.rst b/docs/api/api_python/mindspore/mindspore.pytype_to_dtype.rst index d5b43d585b2..f908d705136 100644 --- a/docs/api/api_python/mindspore/mindspore.pytype_to_dtype.rst +++ b/docs/api/api_python/mindspore/mindspore.pytype_to_dtype.rst @@ -11,4 +11,8 @@ mindspore.pytype_to_dtype **返回:** - MindSpore的数据类型。 \ No newline at end of file + MindSpore的数据类型。 + + **异常:** + + - **NotImplementedError** – Python类型无法转换为MindSpore类型。 \ No newline at end of file diff --git a/docs/api/api_python/mindspore/mindspore.save_checkpoint.rst b/docs/api/api_python/mindspore/mindspore.save_checkpoint.rst index 02b0aaa0e1f..1b258c6b184 100644 --- a/docs/api/api_python/mindspore/mindspore.save_checkpoint.rst +++ b/docs/api/api_python/mindspore/mindspore.save_checkpoint.rst @@ -17,5 +17,4 @@ mindspore.save_checkpoint **异常:** - - **TypeError** – 如果参数 `save_obj` 类型不为nn.Cell或者list,且如果参数 `integrated_save` 及 `async_save` 非bool类型。 - - **TypeError** – 如果参数 `ckpt_file_name` 不是str类型。 + - **TypeError** – 如果参数 `save_obj` 类型不为nn.Cell或者list,且如果参数 `integrated_save` 及 `async_save` 非bool类型。如果参数 `ckpt_file_name` 不是字符串类型。 diff --git a/docs/api/api_python/nn/mindspore.nn.auc.rst b/docs/api/api_python/nn/mindspore.nn.auc.rst index f99c92927cb..d00de18ebe1 100644 --- a/docs/api/api_python/nn/mindspore.nn.auc.rst +++ b/docs/api/api_python/nn/mindspore.nn.auc.rst @@ -10,6 +10,7 @@ mindspore.nn.auc - **x** (Union[np.array, list]) - 从ROC曲线(False Positive Rate, FPR)来看,np.array具有假阳性率。如果是多类,则为np.array列表。Shape为 :math:`(N)` 。 - **y** (Union[np.array, list]) - 从ROC曲线(True Positive Rate, TPR)来看,np.array具有假阳性率。如果是多类,则为np.array列表。Shape为 :math:`(N)` 。 + - **reorder** (bool) - 如果为False,那么 `x` 必须是单调上升或下降的,如果为True,那么 `x` 将会按照升序排序。默认值:False。 **返回:** diff --git a/mindspore/python/mindspore/train/serialization.py b/mindspore/python/mindspore/train/serialization.py index b25b60c88c5..5566ba5581f 100644 --- a/mindspore/python/mindspore/train/serialization.py +++ b/mindspore/python/mindspore/train/serialization.py @@ -263,8 +263,8 @@ def save_checkpoint(save_obj, ckpt_file_name, integrated_save=True, mode, currently supports 'AES-GCM' and 'AES-CBC'. Default: 'AES-GCM'. Raises: - TypeError: If the parameter save_obj is not `nn.Cell` or list type. And if the parameter - `integrated_save` and `async_save` are not bool type. + TypeError: If the parameter save_obj is not `nn.Cell` or list type. And if the parameter `integrated_save` + and `async_save` are not bool type. If the parameter ckpt_file_name is not string type. Examples: >>> from mindspore import save_checkpoint