diff --git a/docs/api/api_python/dataset/mindspore.dataset.Dataset.rst b/docs/api/api_python/dataset/mindspore.dataset.Dataset.rst index af1b3b4bfd6..1550ef666f4 100644 --- a/docs/api/api_python/dataset/mindspore.dataset.Dataset.rst +++ b/docs/api/api_python/dataset/mindspore.dataset.Dataset.rst @@ -28,8 +28,8 @@ - **drop_remainder** (bool, 可选) - 当最后一个批处理数据包含的数据条目小于 `batch_size` 时,是否将该批处理丢弃,不传递给下一个操作。默认值:False,不丢弃。 - **num_parallel_workers** (int, 可选) - 指定 `batch` 操作的并发进程数/线程数(由参数 `python_multiprocessing` 决定当前为多进程模式或多线程模式)。 默认值:None,使用mindspore.dataset.config中配置的线程数。 - - **per_batch_map** (Callable[[List[numpy.ndarray], ..., List[numpy.ndarray], BatchInfo], (List[numpy.ndarray], - ..., List[numpy.ndarray])], 可选) - 可调用对象,以(list[numpy.ndarray], ..., list[numpy.ndarray], BatchInfo)作为输入参数, + - **per_batch_map** (Callable[[List[numpy.ndarray], ..., List[numpy.ndarray], BatchInfo], (List[numpy.ndarray], ..., List[numpy.ndarray])], 可选) - 可调用对象, + 以(list[numpy.ndarray], ..., list[numpy.ndarray], BatchInfo)作为输入参数, 处理后返回(list[numpy.ndarray], list[numpy.ndarray],...)作为新的数据列。输入参数中每个list[numpy.ndarray]代表给定数据列中的一批numpy.ndarray, list[numpy.ndarray]的个数应与 `input_columns` 中传入列名的数量相匹配,在返回的(list[numpy.ndarray], list[numpy.ndarray], ...)中, list[numpy.ndarray]的个数应与输入相同,如果输出列数与输入列数不一致,则需要指定 `output_columns`。该可调用对象的最后一个输入参数始终是BatchInfo, diff --git a/docs/api/api_python/nn/mindspore.nn.Adam.rst b/docs/api/api_python/nn/mindspore.nn.Adam.rst index aa48ce41527..c4d785c96c9 100644 --- a/docs/api/api_python/nn/mindspore.nn.Adam.rst +++ b/docs/api/api_python/nn/mindspore.nn.Adam.rst @@ -92,5 +92,3 @@ mindspore.nn.Adam - **ValueError** - `beta1` 、`beta2` 不在(0.0,1.0)范围内。 - **ValueError** - `weight_decay` 小于0。 - - .. include:: mindspore.nn.optim_target_unique_for_sparse.rst diff --git a/docs/api/api_python/nn/mindspore.nn.AdamWeightDecay.rst b/docs/api/api_python/nn/mindspore.nn.AdamWeightDecay.rst index 71347529eb1..55fb7cf4840 100644 --- a/docs/api/api_python/nn/mindspore.nn.AdamWeightDecay.rst +++ b/docs/api/api_python/nn/mindspore.nn.AdamWeightDecay.rst @@ -78,4 +78,3 @@ mindspore.nn.AdamWeightDecay - **ValueError** - `beta1` 、 `beta2` 不在(0.0,1.0)范围内。 - **ValueError** - `weight_decay` 小于0。 - .. include:: mindspore.nn.optim_target_unique_for_sparse.rst diff --git a/docs/api/api_python/nn/mindspore.nn.FTRL.rst b/docs/api/api_python/nn/mindspore.nn.FTRL.rst index 2d4510947de..16e1c15d7aa 100644 --- a/docs/api/api_python/nn/mindspore.nn.FTRL.rst +++ b/docs/api/api_python/nn/mindspore.nn.FTRL.rst @@ -69,6 +69,3 @@ mindspore.nn.FTRL - **ValueError** - `lr_power` 大于0。 - **ValueError** - `loss_scale` 小于等于0。 - **ValueError** - `initial_accum`、`l1` 或 `l2` 小于0。 - - - .. include:: mindspore.nn.optim_target_unique_for_sparse.rst \ No newline at end of file diff --git a/docs/api/api_python/nn/mindspore.nn.LazyAdam.rst b/docs/api/api_python/nn/mindspore.nn.LazyAdam.rst index 86c68fe5240..9d838c118f0 100644 --- a/docs/api/api_python/nn/mindspore.nn.LazyAdam.rst +++ b/docs/api/api_python/nn/mindspore.nn.LazyAdam.rst @@ -66,5 +66,3 @@ mindspore.nn.LazyAdam - **ValueError** - `loss_scale` 或 `eps` 小于或等于0。 - **ValueError** - `beta1`、`beta2` 不在(0.0,1.0)范围内。 - **ValueError** - `weight_decay` 小于0。 - - .. include:: mindspore.nn.optim_target_unique_for_sparse.rst diff --git a/docs/api/api_python/nn/mindspore.nn.Optimizer.rst b/docs/api/api_python/nn/mindspore.nn.Optimizer.rst index a2cdc767dde..f64e1adc13d 100644 --- a/docs/api/api_python/nn/mindspore.nn.Optimizer.rst +++ b/docs/api/api_python/nn/mindspore.nn.Optimizer.rst @@ -25,7 +25,7 @@ mindspore.nn.Optimizer - **weight_decay** (Union[float, int]) - 权重衰减的整数或浮点值。必须等于或大于0。如果 `weight_decay` 是整数,它将被转换为浮点数。默认值:0.0。 - .. include:: mindspore.nn.optim_arg_loss_scale.rst + .. include:: mindspore.nn.optim_arg_loss_scale.rst 异常: - **TypeError** - `learning_rate` 不是int、float、Tensor、Iterable或LearningRateSchedule。 diff --git a/docs/api/api_python/nn/mindspore.nn.ProximalAdagrad.rst b/docs/api/api_python/nn/mindspore.nn.ProximalAdagrad.rst index e25e48751cc..efa5a637239 100644 --- a/docs/api/api_python/nn/mindspore.nn.ProximalAdagrad.rst +++ b/docs/api/api_python/nn/mindspore.nn.ProximalAdagrad.rst @@ -62,6 +62,3 @@ mindspore.nn.ProximalAdagrad - **TypeError** - `weight_decay` 不是float或int。 - **ValueError** - `loss_scale` 小于或等于0。 - **ValueError** - `accum`、`l1`、`l2` 或 `weight_decay` 小于0。 - - - .. include:: mindspore.nn.optim_target_unique_for_sparse.rst diff --git a/docs/api/api_python_en/Tensor_list.rst b/docs/api/api_python_en/Tensor_list.rst index 171203d6ebc..3f41d61b93b 100644 --- a/docs/api/api_python_en/Tensor_list.rst +++ b/docs/api/api_python_en/Tensor_list.rst @@ -10,6 +10,13 @@ :exclude-members: infer_value, infer_shape, infer_dtype, construct :members: +{% elif fullname in ["mindspore.nn.Adam","mindspore.nn.AdamWeightDecay","mindspore.nn.FTRL","mindspore.nn.LazyAdam","mindspore.nn.ProximalAdagrad"] %} +{{ fullname | underline }} + +.. autoclass:: {{ name }} + :exclude-members: infer_value, infer_shape, infer_dtype, target + :members: + {% elif fullname=="mindspore.Tensor" %} {{ fullname | underline }} diff --git a/mindspore/python/mindspore/common/tensor.py b/mindspore/python/mindspore/common/tensor.py index b71b716b82e..be4bf805022 100644 --- a/mindspore/python/mindspore/common/tensor.py +++ b/mindspore/python/mindspore/common/tensor.py @@ -5525,7 +5525,7 @@ class Tensor(Tensor_): The first input tensor must be not less than `3` and the second input must be not less than `2`. Args: - mat2 (Tensor) - The tensor to be multiplied. The shape of the tensor is :math:`(*B, C, M)`. + mat2 (Tensor): The tensor to be multiplied. The shape of the tensor is :math:`(*B, C, M)`. Outputs: Tensor, the shape of the output tensor is :math:`(*B, N, M)`. diff --git a/mindspore/python/mindspore/ops/function/math_func.py b/mindspore/python/mindspore/ops/function/math_func.py index 9204ee07c33..39aad39e43c 100644 --- a/mindspore/python/mindspore/ops/function/math_func.py +++ b/mindspore/python/mindspore/ops/function/math_func.py @@ -5190,10 +5190,10 @@ def bmm(input_x, mat2): The first input tensor must be not less than `3` and the second input must be not less than `2`. Args: - input_x (Tensor) - The first tensor to be multiplied. The shape of the tensor is :math:`(*B, N, C)`, + input_x (Tensor): The first tensor to be multiplied. The shape of the tensor is :math:`(*B, N, C)`, where :math:`*B` represents the batch size which can be multidimensional, :math:`N` and :math:`C` are the size of the last two dimensions. - mat2 (Tensor) - The second tensor to be multiplied. The shape of the tensor is :math:`(*B, C, M)`. + mat2 (Tensor): The second tensor to be multiplied. The shape of the tensor is :math:`(*B, C, M)`. Outputs: Tensor, the shape of the output tensor is :math:`(*B, N, M)`.