From b30974c6d4492de700d54a4f7b879832a1dc96d7 Mon Sep 17 00:00:00 2001 From: huanxiaoling <3174348550@qq.com> Date: Sat, 26 Nov 2022 10:38:34 +0800 Subject: [PATCH] modify the format of files 1126 --- docs/api/api_python/mindspore.train.rst | 2 +- docs/api/api_python/ops/mindspore.ops.Dilation2D.rst | 2 +- docs/api/api_python/ops/mindspore.ops.Lstsq.rst | 2 +- docs/api/api_python/ops/mindspore.ops.Nonzero.rst | 2 +- docs/api/api_python_en/mindspore.train.rst | 2 +- mindspore/lite/python/api/converter.py | 2 +- mindspore/python/mindspore/ops/operations/math_ops.py | 4 ++-- mindspore/python/mindspore/ops/operations/nn_ops.py | 8 ++++---- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/api/api_python/mindspore.train.rst b/docs/api/api_python/mindspore.train.rst index 4d1020bd08b..e029f28906a 100644 --- a/docs/api/api_python/mindspore.train.rst +++ b/docs/api/api_python/mindspore.train.rst @@ -78,7 +78,7 @@ mindspore.train ---------- .. mscnautosummary:: - :toctree: mindspore + :toctree: train mindspore.train.ConvertModelUtils mindspore.train.ConvertNetUtils diff --git a/docs/api/api_python/ops/mindspore.ops.Dilation2D.rst b/docs/api/api_python/ops/mindspore.ops.Dilation2D.rst index 01df9305758..e9ee71444ac 100644 --- a/docs/api/api_python/ops/mindspore.ops.Dilation2D.rst +++ b/docs/api/api_python/ops/mindspore.ops.Dilation2D.rst @@ -55,4 +55,4 @@ - **ValueError** - 如果参数 `stride` 的取值范围不是 `[1, 255]` 。 - **ValueError** - 如果参数 `dilation` 的值小于1。 - **ValueError** - 如果参数 `pad_mode` 不是 `same` 、 `valid` 、 `SAME` 或者 `VALID`。 - - **ValueError** - 如果参数 `data_format` 不是字符串`NCHW`。 + - **ValueError** - 如果参数 `data_format` 不是字符串 `NCHW` 。 diff --git a/docs/api/api_python/ops/mindspore.ops.Lstsq.rst b/docs/api/api_python/ops/mindspore.ops.Lstsq.rst index 4c3c16a0896..f59bce8a564 100644 --- a/docs/api/api_python/ops/mindspore.ops.Lstsq.rst +++ b/docs/api/api_python/ops/mindspore.ops.Lstsq.rst @@ -40,6 +40,6 @@ mindspore.ops.Lstsq - **TypeError** - 若输入 `x` 或 `a` 不是Tensor。 - **TypeError** - 若 `x` 或 `a` 的数据类型不是以下之一:float16、float32、float64。 - **TypeError** - 若 `x` 或 `a` 的数据类型不同。 - - **TypeError** - 若 `x` 的维度不等于2。 + - **ValueError** - 若 `x` 的维度不等于2。 - **ValueError** - 若 `a` 的维度不等于2或1。 - **ValueError** - 若 `x` 与 `a` shape的第0维不相等。 diff --git a/docs/api/api_python/ops/mindspore.ops.Nonzero.rst b/docs/api/api_python/ops/mindspore.ops.Nonzero.rst index 65d7669c5e3..06fb89b7378 100644 --- a/docs/api/api_python/ops/mindspore.ops.Nonzero.rst +++ b/docs/api/api_python/ops/mindspore.ops.Nonzero.rst @@ -1,7 +1,7 @@ mindspore.ops.Nonzero ====================== -.. py:class:: mindspore.nn.Nonzero +.. py:class:: mindspore.ops.Nonzero 计算输入Tensor中所有非零元素的下标。 diff --git a/docs/api/api_python_en/mindspore.train.rst b/docs/api/api_python_en/mindspore.train.rst index f8eb6847962..1219888778e 100644 --- a/docs/api/api_python_en/mindspore.train.rst +++ b/docs/api/api_python_en/mindspore.train.rst @@ -82,7 +82,7 @@ Thor --------------- .. autosummary:: - :toctree: mindspore + :toctree: train :nosignatures: :template: classtemplate.rst diff --git a/mindspore/lite/python/api/converter.py b/mindspore/lite/python/api/converter.py index f319eb1caa2..4a6a1a557e6 100644 --- a/mindspore/lite/python/api/converter.py +++ b/mindspore/lite/python/api/converter.py @@ -97,7 +97,7 @@ class Converter: corresponding to `model_file` parameter; 'model.Caffemodel' is model weight value file, corresponding to `weight_file` parameter. For example, "/home/user/model.caffemodel". Default: "". config_file (str, optional): Set the path of the configuration file of Converter can be used to post-training, - offline split op to parallel, disable op fusion ability and set plugin so path. `config_file' uses the + offline split op to parallel, disable op fusion ability and set plugin so path. `config_file` uses the `key = value` method to define the related parameters. For the configuration parameters related to post training quantization, please refer to `quantization `_ . diff --git a/mindspore/python/mindspore/ops/operations/math_ops.py b/mindspore/python/mindspore/ops/operations/math_ops.py index 434b444726f..03b9b3be758 100644 --- a/mindspore/python/mindspore/ops/operations/math_ops.py +++ b/mindspore/python/mindspore/ops/operations/math_ops.py @@ -5797,7 +5797,7 @@ class ComplexAbs(Primitive): Outputs: Tensor, has the same shape as x. If the type of x is complex64, the type of output is float32. - If the type of x is complex128, the type of output is float64. + If the type of x is complex128, the type of output is float64. Raises: TypeError: If the input is not a Tensor. @@ -7332,7 +7332,7 @@ class MatrixTriangularSolve(Primitive): Raises: TypeError: If `matrix` or `rhs` is not a Tensor. TypeError: If `lower` or `adjoint` is not bool. - ValueError: If the batch sizes of `matrix`and `rhs` are not equal. + ValueError: If the batch sizes of `matrix` and `rhs` are not equal. ValueError: If the inner-most 2 dimensions of `matrix` are not equal. ValueError: If the second-last dimensions of `matrix` and `rhs` are not equal. diff --git a/mindspore/python/mindspore/ops/operations/nn_ops.py b/mindspore/python/mindspore/ops/operations/nn_ops.py index eab08ab58a4..e0ad77c5969 100644 --- a/mindspore/python/mindspore/ops/operations/nn_ops.py +++ b/mindspore/python/mindspore/ops/operations/nn_ops.py @@ -1405,9 +1405,9 @@ class DataFormatVecPermute(Primitive): Permute input tensor from src_format to dst_format. Args: - src_format (str): An optional value for source data format. The format can be 'NHWC' and 'NCHW'. + src_format (str, optional): An optional value for source data format. The format can be 'NHWC' and 'NCHW'. Default: 'NHWC'. - dst_format (str): An optional value for destination data format. The format can be 'NHWC' and 'NCHW'. + dst_format (str, optional): An optional value for destination data format. The format can be 'NHWC' and 'NCHW'. Default: 'NCHW'. Inputs: @@ -10215,8 +10215,8 @@ class FractionalMaxPoolWithFixedKsize(Primitive): TypeError: If data type of `random_samples` is not one of the following: float16, float32, float64. ValueError: If `ksize` is not a number and `ksize` is not a tuple of length 2. ValueError: If `output_shape` is not a number and `output_shape` is not a tuple of length 2. - ValueError: If the sum of `ksize`, `output_shape` and -1 is larger than the corresponding - dimension of `input_x`. + ValueError: If the sum of `ksize` , `output_shape` and + -1 is larger than the corresponding dimension of `input_x`. ValueError: If the dimension of `random_samples` is not 3. ValueError: If the first dimension size of `input_x` and `random_samples` is not equal. ValueError: If the second dimension size of `input_x` and `random_samples` is not equal.