fix bug of docs
This commit is contained in:
parent
8edb949d35
commit
b23d360bf1
|
@ -1,17 +1,17 @@
|
|||
mindspore.ops.Cauchy
|
||||
====================
|
||||
|
||||
.. py:class:: mindspore.ops.Cauchy
|
||||
.. py:class:: mindspore.ops.Cauchy(size, sigma=1.0, median=0.0)
|
||||
|
||||
从柯西分布中提取的随机数创建shape由 `size` 决定的Tensor。
|
||||
|
||||
.. math::
|
||||
\f(x)= \frac{1}{\pi} \frac{\sigma}{(x-median)^2 +\sigma^2}
|
||||
f(x)= \frac{1}{\pi} \frac{\sigma}{(x-median)^2 +\sigma^2}
|
||||
|
||||
输入:
|
||||
参数:
|
||||
- **size** (list[int]) - 描述输出Tensor的shape。
|
||||
- **sigma** (float) - 位置参数,指定分布峰值的位置。默认值:1.0。
|
||||
- **median** (float) - 尺度参数,指定半宽半最大值处的scale参数。默认值:0.0。
|
||||
- **sigma** (float,可选) - 位置参数,指定分布峰值的位置。默认值:1.0。
|
||||
- **median** (float,可选) - 尺度参数,指定半宽半最大值处的scale参数。默认值:0.0。
|
||||
|
||||
输出:
|
||||
Tensor,数据类型为float32,shape由 `size` 决定的Tensor。Tensor中的数值符合柯西分布。
|
||||
|
@ -19,6 +19,6 @@ mindspore.ops.Cauchy
|
|||
异常:
|
||||
- **TypeError** - `sigma` 不是float。
|
||||
- **TypeError** - `median` 不是float。
|
||||
- **ValueError** - `size` 不是list。
|
||||
- **TypeError** - `size` 不是list。
|
||||
- **ValueError** - `size` 是空的。
|
||||
- **ValueError** - `size` 中的数值不是正数。
|
||||
|
|
|
@ -175,7 +175,7 @@ def adaptive_avg_pool3d(input_x, output_size):
|
|||
ValueError: If `output_size` value is not positive.
|
||||
|
||||
Supported Platforms:
|
||||
``GPU``
|
||||
``GPU`` ``CPU``
|
||||
|
||||
Examples:
|
||||
>>> # case 1: output_size=(3, 3, 4)
|
||||
|
|
|
@ -7622,13 +7622,13 @@ class Cauchy(Primitive):
|
|||
Create a tensor of shape `size` with random numbers drawn from Cauchy distribution
|
||||
|
||||
.. math::
|
||||
\f(x)= \frac{1}{\pi} \frac{\sigma}{(x-median)^2 +\sigma^2}
|
||||
f(x)= \frac{1}{\pi} \frac{\sigma}{(x-median)^2 +\sigma^2}
|
||||
|
||||
Args:
|
||||
size (list[int]): The size of tensor.
|
||||
sigma (float): the location parameter, specifying the location
|
||||
sigma (float, optional): the location parameter, specifying the location
|
||||
of the peak of the distribution. Default: 1.0.
|
||||
median (float): the scale parameter which specifies the half-width
|
||||
median (float, optional): the scale parameter which specifies the half-width
|
||||
at half-maximum. Default: 0.0.
|
||||
|
||||
Outputs:
|
||||
|
|
|
@ -148,43 +148,6 @@ class AdaptiveAvgPool3D(Primitive):
|
|||
r"""
|
||||
AdaptiveAvgPool3D operation.
|
||||
|
||||
This operator applies a 3D adaptive average pooling to an input signal composed of multiple input planes.
|
||||
That is, for any input size, the size of the specified output is D x H x W.
|
||||
The number of output features is equal to the number of input planes.
|
||||
|
||||
Suppose the last 3 dimension size of x is inD, inH, inW, the last 3 dimension size of output is outD, outH, outW.
|
||||
|
||||
.. math::
|
||||
\begin{array}{ll} \\
|
||||
\forall \quad od \in [0,outD-1], oh \in [0,outH-1], ow \in [0,outW-1]\\
|
||||
output[od,oh,ow] = \\
|
||||
\qquad mean(x[istartD:iendD+1,istartH:iendH+1,istartW:iendW+1])\\
|
||||
where,\\
|
||||
\qquad istartD= \left\lceil \frac{od * inD}{outD} \right\rceil \\
|
||||
\qquad iendD=\left\lfloor \frac{(od+1)* inD}{outD} \right\rfloor \\
|
||||
\qquad istartH=\left\lceil \frac{oh * inH}{outH} \right\rceil \\
|
||||
\qquad iendH=\left\lfloor \frac{(oh+1) * inH}{outH} \right\rfloor \\
|
||||
\qquad istartW=\left\lceil \frac{ow * inW}{outW} \right\rceil \\
|
||||
\qquad iendW=\left\lfloor \frac{(ow+1) * inW}{outW} \right\rfloor
|
||||
\end{array}
|
||||
|
||||
Args:
|
||||
output_size (Union[int, tuple[int]]): The last 3 dimension size of output tensor, which is int or
|
||||
triple-int tuple. The value in output_size tuple can also be None. In this case, the particular output
|
||||
dimesion size will be set to be the same as the according input dimension.
|
||||
|
||||
Inputs:
|
||||
- **x** (Tensor) - The input of AdaptiveAvgPool3D, which is a 5D or 4D tensor.
|
||||
|
||||
Outputs:
|
||||
Tensor, with the same type as the `x`.
|
||||
|
||||
Raises:
|
||||
TypeError: If `x` is not a tensor.
|
||||
ValueError: If the dimension of `x` is not 4D or 5D.
|
||||
ValueError: If the attr `output_size` is not int or triple-int tuple.
|
||||
ValueError: If `output_size` value is negative.
|
||||
|
||||
Refer to :func:`mindspore.ops.adaptive_avg_pool3d` for more details.
|
||||
|
||||
Supported Platforms:
|
||||
|
|
Loading…
Reference in New Issue