forked from mindspore-Ecosystem/mindspore
modify format
This commit is contained in:
parent
6ac63e2601
commit
07d79c7c88
|
@ -385,6 +385,31 @@ mindspore.Tensor
|
|||
|
||||
与输入的张量具有相同的数据类型的Tensor。
|
||||
|
||||
.. py:method:: gather_nd(input_x, indices)
|
||||
|
||||
按索引从张量中获取切片。
|
||||
使用给定的索引从具有指定形状的张量中搜集切片。
|
||||
`indices` 是一个K维的整数张量,假定它的K-1维张量中的每一个元素是 `input_x` 的切片,那么有:
|
||||
|
||||
.. math::
|
||||
output[(i_0, ..., i_{K-2})] = input\_x[indices[(i_0, ..., i_{K-2})]]
|
||||
|
||||
`indices` 的最后一维不能超过 `input_x` 的秩:
|
||||
:math:`indices.shape[-1] <= input\_x.rank`。
|
||||
|
||||
**参数:**
|
||||
|
||||
- **input_x** (Tensor) - 待搜集元素的目标张量,它的shape是 :math:`(N,*)` ,其中 :math:`*` 表示任意数量的附加维度。
|
||||
- **indices** (Tensor) - 获取收集元素的索引张量,其数据类型包括:int32,int64。
|
||||
|
||||
**返回:**
|
||||
|
||||
Tensor,具有与入参 `input_x` 相同的数据类型,shape维度为indices_shape[:-1] + input_x_shape[indices_shape[-1]:]。
|
||||
|
||||
**异常:**
|
||||
|
||||
- **ValueError** - 如果 `input_x` 的shape长度小于 `indices` 的最后一个维度。
|
||||
|
||||
.. py:method:: ger(x)
|
||||
|
||||
计算两个Tensor的外积,即计算此Tensor 和 `x` 的外积。如果此Tensor shape为 :math:`(m,)` ,`x` shape为 :math:`(n,)` ,
|
||||
|
@ -810,31 +835,6 @@ mindspore.Tensor
|
|||
- **ValueError** - 如果 `block_shape` 的元素不是大于一的整数。
|
||||
- **ValueError** - 如果 `paddings` 的元素不是非负的整数。
|
||||
|
||||
.. py:method:: gather_nd(input_x, indices)
|
||||
|
||||
按索引从张量中获取切片。
|
||||
使用给定的索引从具有指定形状的张量中搜集切片。
|
||||
`indices` 是一个K维的整数张量,假定它的K-1维张量中的每一个元素是 `input_x` 的切片,那么有:
|
||||
|
||||
.. math::
|
||||
output[(i_0, ..., i_{K-2})] = input\_x[indices[(i_0, ..., i_{K-2})]]
|
||||
|
||||
`indices` 的最后一维不能超过 `input_x` 的秩:
|
||||
:math:`indices.shape[-1] <= input\_x.rank`。
|
||||
|
||||
**参数:**
|
||||
|
||||
- **input_x** (Tensor) - 待搜集元素的目标张量,它的shape是 :math:`(N,*)` ,其中 :math:`*` 表示任意数量的附加维度。
|
||||
- **indices** (Tensor) - 获取收集元素的索引张量,其数据类型包括:int32,int64。
|
||||
|
||||
**返回:**
|
||||
|
||||
Tensor,具有与入参 `input_x` 相同的数据类型,shape维度为indices_shape[:-1] + input_x_shape[indices_shape[-1]:]。
|
||||
|
||||
**异常:**
|
||||
|
||||
- **ValueError** - 如果 `input_x` 的shape长度小于 `indices` 的最后一个维度。
|
||||
|
||||
.. py:method:: shape
|
||||
:property:
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
mindspore.nn.AdaptiveMaxPool1d
|
||||
=======================
|
||||
==============================
|
||||
|
||||
.. py:class:: mindspore.nn.AdaptiveMaxPool1d(output_size)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
多尺度计算两个图像之间的结构相似性(SSIM)。
|
||||
|
||||
基于Zhou Wang、Eero P.Simoncelli和Alan C.Bovik在2004年于Signals, Systems 和 Computers上发表的 `Multiscale structural similarity for image quality assessment<https://ieeexplore.ieee.org/document/1292216>`_ 。
|
||||
基于Zhou Wang、Eero P.Simoncelli和Alan C.Bovik在2004年于Signals, Systems 和 Computers上发表的 `Multiscale structural similarity for image quality assessment <https://ieeexplore.ieee.org/document/1292216>`_ 。
|
||||
|
||||
.. math::
|
||||
l(x,y)&=\frac{2\mu_x\mu_y+C_1}{\mu_x^2+\mu_y^2+C_1}, C_1=(K_1L)^2.\\
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* (w_{end}- w_{start})}
|
||||
\end{align}
|
||||
|
||||
**参数:**
|
||||
**参数:**
|
||||
|
||||
- **output_size** (Union[int, tuple]) - 输出特征图的尺寸为H * W。可以是int类型的H和W组成的tuple,也可以是H * H的单个H,或None,如果是None,这意味着输出大小与输入相同。
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
.. py:class:: mindspore.ops.ApplyAdadelta
|
||||
|
||||
根据Adadelta算法更新相关参数。
|
||||
根据Adadelta算法更新相关参数。
|
||||
|
||||
Adadelta算法,具体细节可参考论文 `ADADELTA: AN ADAPTIVE LEARNING RATE METHOD <https://arxiv.org/abs/1212.5701>`_ 。
|
||||
Adadelta算法,具体细节可参考论文 `ADADELTA: AN ADAPTIVE LEARNING RATE METHOD <https://arxiv.org/abs/1212.5701>`_ 。
|
||||
|
||||
.. math::
|
||||
\begin{array}{ll} \\
|
||||
|
@ -41,4 +41,4 @@
|
|||
|
||||
- **TypeError** - 如果 `var` 、 `accum` 、 `accum_update` 、 `lr` 、 `rho` 、 `epsilon` 或 `grad` 的数据类型既不是float16也不是float32。
|
||||
- **TypeError** - 如果 `accum_update` 、 `lr` 、 `rho` 或 `epsilon` 既不是数值型也不是Tensor。
|
||||
- **RuntimeError** - 如果`var` 、 `accum` 、 `accum_update` 和 `grad` 不支持数据类型转换。
|
||||
- **RuntimeError** - 如果 `var` 、 `accum` 、 `accum_update` 和 `grad` 不支持数据类型转换。
|
|
@ -36,6 +36,6 @@
|
|||
**异常:**
|
||||
|
||||
- **TypeError** - 如果 `var` 、 `lr` 、 `alpha` 、 `sign_decay` 或 `beta` 的数据类型既不是float16也不是float32。
|
||||
- **TypeError** - 如果 `lr` 、 `alpha`或 `sign_decay` 既不是数值型,也不是Tensor。
|
||||
- **TypeError** - 如果 `lr` 、 `alpha` 或 `sign_decay` 既不是数值型,也不是Tensor。
|
||||
- **TypeError** - 如果 `grad` 不是Tensor。
|
||||
- **RuntimeError** - 如果不支持参数的 `var` 、 `accum` 和 `grad` 数据类型转换。
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
**输出:**
|
||||
|
||||
- **var**(Tensor)- 表示更新后的 `var` 。由于输入参数已更新,因此当平台为GPU时,此值始终为零。
|
||||
- **var** (Tensor) - 表示更新后的 `var` 。由于输入参数已更新,因此当平台为GPU时,此值始终为零。
|
||||
|
||||
**异常:**
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
mindspore.ops.bessel_i1e
|
||||
=======================
|
||||
========================
|
||||
|
||||
.. py:class:: mindspore.ops.bessel_i1e
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
mindspore.ops.bessel_k1e
|
||||
=======================
|
||||
========================
|
||||
|
||||
.. py:class:: mindspore.ops.bessel_k1e
|
||||
|
||||
|
|
|
@ -12,13 +12,13 @@ mindspore.ops.tensor_scatter_div
|
|||
- 算子无法处理除0异常, 用户需保证 `updates` 中没有0值。
|
||||
|
||||
|
||||
**输入:**
|
||||
**参数:**
|
||||
|
||||
- **input_x** (Tensor) - 输入Tensor。 `input_x` 的维度必须不小于indices.shape[-1]。
|
||||
- **indices** (Tensor) - 输入Tensor的索引,数据类型为int32或int64的。其rank必须至少为2。
|
||||
- **updates** (Tensor) - 指定与 `input_x` 相加操作的Tensor,其数据类型与输入相同。updates.shape应等于indices.shape[:-1] + input_x.shape[indices.shape[-1]:]。
|
||||
|
||||
**输出:**
|
||||
**返回:**
|
||||
|
||||
Tensor,shape和数据类型与输入 `input_x` 相同。
|
||||
|
||||
|
|
Loading…
Reference in New Issue