forked from mindspore-Ecosystem/mindspore
modify the format of files 1213
This commit is contained in:
parent
5b6dedf93b
commit
12ef0dcea9
|
@ -12,7 +12,7 @@ mindspore.dataset.audio.MFCC
|
|||
- **norm** (NormMode, 可选) - 要使用的标准类型。默认:NormMode.ORTHO。
|
||||
- **log_mels** (bool, 可选) - 是否使用梅尔对数谱图而不是分贝刻度。默认:False。
|
||||
- **melkwargs** (dict, 可选) - 梅尔频谱的参数,如果为None则使用默认参数。默认:None,会被设置为
|
||||
`{'n_fft': 400, 'win_length': n_fft, 'hop_length': win_length // 2, 'f_min' : 0.0, 'f_max' : sample_rate // 2, 'pad': 0, 'window': WindowType.HANN, 'power': 2.0, 'normalized': False, 'center': True, 'pad_mode': BorderType.REFLECT, 'onesided': True, 'norm' : NormType.NONE, 'mel_scale' : MelType.HTK}` 。
|
||||
`{'n_fft': 400, 'win_length': n_fft, 'hop_length': win_length // 2, 'f_min' : 0.0, 'f_max' : sample_rate // 2, 'pad': 0, 'window': WindowType.HANN, 'power': 2.0, 'normalized': False, 'center': True, 'pad_mode': BorderType.REFLECT, 'onesided': True, 'norm' : NormType.NONE, 'mel_scale' : MelType.HTK}` 。
|
||||
|
||||
异常:
|
||||
- **TypeError** - 如果 `sample_rate` 的类型不为int。
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mindspore.JitConfig
|
||||
====================
|
||||
|
||||
.. py:class:: mindspore.JitConfig(jit_level="O1", exc_mode=auto, **kwargs)
|
||||
.. py:class:: mindspore.JitConfig(jit_level="O1", exc_mode="auto", **kwargs)
|
||||
|
||||
编译时所使用的JitConfig配置项。
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mindspore.ops.addr
|
||||
==================
|
||||
|
||||
.. py:function:: mindspore.ops.addr(vec1, vec2, beta=1, alpha=1)
|
||||
.. py:function:: mindspore.ops.addr(x, vec1, vec2, beta=1, alpha=1)
|
||||
|
||||
计算 `vec1` 和 `vec2` 的外积,并将其添加到 `x` 中。
|
||||
|
||||
|
@ -14,6 +14,7 @@ mindspore.ops.addr
|
|||
output = β x + α (vec1 ⊗ vec2)
|
||||
|
||||
参数:
|
||||
- **x** (Tensor) - 需要相加的向量。Tensor的shape是 :math:`(N, M)` 。
|
||||
- **vec1** (Tensor) - 第一个需要相乘的Tensor,shape大小为 :math:`(N,)` 。
|
||||
- **vec2** (Tensor) - 第二个需要相乘的Tensor,shape大小为 :math:`(M,)` 。
|
||||
- **beta** (scalar[int, float, bool], 可选) - `x` (β)的乘法器。 `beta` 必须是int或float或bool类型,默认值:1。
|
||||
|
|
|
@ -12,4 +12,4 @@ mindspore.ops.t
|
|||
Tensor,`x` 的转置。
|
||||
|
||||
异常:
|
||||
- **TypeError** - `x` 的维度大于2。
|
||||
- **ValueError** - `x` 的维度大于2。
|
||||
|
|
|
@ -7,7 +7,7 @@ mindspore.ops.zeros
|
|||
|
||||
参数:
|
||||
- **shape** (Union[tuple[int], int]) - 用来描述所创建的Tensor的 `shape` 。
|
||||
- **dtype** (:class:`mindspore.dtype`) - 用来描述所创建的Tensor的 `dtype`。如果为None,那么将会使用mindspore.float32。默认值:None。
|
||||
- **dtype** (:class:`mindspore.dtype`, 可选) - 用来描述所创建的Tensor的 `dtype`。如果为None,那么将会使用mindspore.float32。默认值:None。
|
||||
|
||||
返回:
|
||||
Tensor,dtype和shape由入参决定。
|
||||
|
|
|
@ -9314,7 +9314,7 @@ def sum(x, dim=None, keepdim=False, *, dtype=None):
|
|||
Returns:
|
||||
A Tensor, sum of elements over a given dim in `x`.
|
||||
|
||||
Raise:
|
||||
Raises:
|
||||
TypeError: If `x` is not a Tensor.
|
||||
TypeError: If `dim` is not an int.
|
||||
ValueError: If `dim` is not in the range :math:`[-x.ndim, x.ndim)` .
|
||||
|
|
|
@ -1825,24 +1825,6 @@ class Argmax(Primitive):
|
|||
|
||||
Refer to :func:`mindspore.ops.argmax` for more details.
|
||||
|
||||
If the shape of input tensor is :math:`(x_1, ..., x_N)`, the shape of the output tensor will be
|
||||
:math:`(x_1, ..., x_{axis-1}, x_{axis+1}, ..., x_N)`.
|
||||
|
||||
Args:
|
||||
axis (int): Axis where the Argmax operation applies to. Default: -1.
|
||||
output_type (:class:`mindspore.dtype`): An optional data type of `mindspore.dtype.int32` and
|
||||
`mindspore.dtype.int64`. Default: `mindspore.dtype.int32`.
|
||||
|
||||
Inputs:
|
||||
- **input_x** (Tensor) - Input tensor. :math:`(N,*)` where :math:`*` means, any number of additional dimensions.
|
||||
|
||||
Outputs:
|
||||
Tensor, whose dtype is determined by `output_type`.
|
||||
|
||||
Raises:
|
||||
TypeError: If `axis` is not an int.
|
||||
TypeError: If `output_type` is neither int32 nor int64.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``GPU`` ``CPU``
|
||||
|
||||
|
@ -5751,8 +5733,8 @@ class Sort(Primitive):
|
|||
- **x** (Tensor) - The input tensor of any dimension, with a type of float16 or float32.
|
||||
|
||||
Outputs:
|
||||
y1(Tensor), a tensor whose values are the sorted values, with the same shape and data type as input.
|
||||
y2(Tensor), the indices of the elements in the original input tensor. Data type is int32.
|
||||
- **y1** (Tensor) - A tensor whose values are the sorted values, with the same shape and data type as input.
|
||||
- **y2** (Tensor) - the indices of the elements in the original input tensor. Data type is int32.
|
||||
|
||||
Raises:
|
||||
TypeError: If `axis` is not an int.
|
||||
|
|
Loading…
Reference in New Issue