!48573 modify format

Merge pull request !48573 from 俞涵/code_docs_1110
This commit is contained in:
i-robot 2023-02-08 10:35:53 +00:00 committed by Gitee
commit 8876c073bb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 5 additions and 14 deletions

View File

@ -5,10 +5,6 @@ mindspore.nn.thor
通过二阶算法THOR更新参数。
基于跟踪的、硬件驱动层定向的自然梯度下降计算THOR算法论文地址为
`THOR: Trace-based Hardware-driven layer-ORiented Natural Gradient Descent Computation <https://www.aaai.org/AAAI21Papers/AAAI-6611.ChenM.pdf>`_
更新公式如下:
.. math::

View File

@ -19,6 +19,7 @@ mindspore.ops.Addcdiv
异常:
- **TypeError** - 如果 `x1``x2``value``input_data` 不是Tensor。
- **TypeError** - 如果 `x1``x2``value``input_data` 的dtype不一致。
- **ValueError** - 如果无法将 `x1` 广播到 `x2`
- **ValueError** - 如果无法将 `value` 广播到 `x1/x2`
- **ValueError** - 如果无法将 `input_data` 广播到 `value*(x1/x2)`

View File

@ -19,9 +19,7 @@ mindspore.ops.Addcmul
异常:
- **TypeError** - 如果 `x1``x2``value``input_data` 不是Tensor。
- **TypeError** - 如果 `input_data` 的dtype不是float32、float16、int32之一。
- **TypeError** - 如果 `x1``x2` 的dtype不是float32、float16、int32之一.
- **TypeError** - 如果 `value` 的dtype不是float32、float16、int32之一。
- **TypeError** - 如果 `x1``x2``value``input_data` 的dtype不一致。
- **ValueError** - 如果无法将 `x1` 广播到 `x2`
- **ValueError** - 如果无法将 `value` 广播到 `x1` * `x2`
- **ValueError** - 如果无法将 `input_data` 广播到 `value*(x1*x2)`

View File

@ -254,10 +254,6 @@ def thor(net, learning_rate, damping, momentum, weight_decay=0.0, loss_scale=1.0
r"""
Updates gradients by second-order algorithm--THOR.
Trace-based Hardware-driven layer-ORiented Natural Gradient Descent Computation (THOR) algorithm is proposed in:
`THOR: Trace-based Hardware-driven layer-ORiented Natural Gradient Descent Computation`_
The updating formulas are as follows,
.. math::

View File

@ -9761,10 +9761,10 @@ def nansum(x, axis=None, keepdims=False, *, dtype=None):
Computes sum of `x` over a given dimension, treating NaNs as zero.
Args:
x (Tensor) - The input Tensor.
axis (Union[int, tuple(int)], optional) - The dimensions to reduce. Supposed the rank of `x` is r,
x (Tensor): The input Tensor.
axis (Union[int, tuple(int)], optional): The dimensions to reduce. Supposed the rank of `x` is r,
axis must be in the range [-rank(x), rank(x)). Default: None, all dimensions are reduced.
keepdims (bool, optional) - Whether the output Tensor keeps dimensions or not. Default: False.
keepdims (bool, optional): Whether the output Tensor keeps dimensions or not. Default: False.
Keyword Args:
dtype (:class:`mindspore.dtype`, optional): The dtype of output Tensor. Default: None.