commit
d4b7c7a44c
|
@ -10,14 +10,13 @@ mindspore.ops.coo_concat
|
||||||
|
|
||||||
参数:
|
参数:
|
||||||
- **sp_input** (Union[list(COOTensor), tuple(COOTensor)]) - 输入的需要concat合并的稀疏张量。
|
- **sp_input** (Union[list(COOTensor), tuple(COOTensor)]) - 输入的需要concat合并的稀疏张量。
|
||||||
- **concat_dim** (标量) - 指定需要合并的轴序号, 它的取值必须是在[-rank, rank)之内,
|
- **concat_dim** (scalar) - 指定需要合并的轴序号, 它的取值必须是在[-rank, rank)之内,
|
||||||
其中rank为sp_input中COOTensor的shape的维度值。缺省值为0。
|
其中rank为sp_input中COOTensor的shape的维度值。缺省值为0。
|
||||||
|
|
||||||
返回:
|
返回:
|
||||||
COOTensor,按concat_dim轴合并后的COOTensor。这个COOTensor的稠密shape值为:
|
COOTensor,按concat_dim轴合并后的COOTensor。这个COOTensor的稠密shape值为:
|
||||||
非concat_dim轴shape与输入一致,concat_dim轴shape是所有输入对应轴shape的累加。
|
非concat_dim轴shape与输入一致,concat_dim轴shape是所有输入对应轴shape的累加。
|
||||||
|
|
||||||
异常:
|
异常:
|
||||||
- **ValueError** - 如果只有一个COOTensor输入,报错。
|
- **ValueError** - 如果只有一个COOTensor输入,报错。
|
||||||
- **ValueError** - 如果输入的COOTensor的shape纬度大于3。COOTensor的构造会报错,
|
- **ValueError** - 如果输入的COOTensor的shape纬度大于3。COOTensor的构造会报错,目前COOTensor的shape维度只能为2。
|
||||||
目前COOTensor的shape维度只能为2。
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ mindspore.ops.max_unpool3d
|
||||||
取值范围需满足:
|
取值范围需满足:
|
||||||
:math:`[(N, C, D_{out} - stride[0], H_{out} - stride[1], W_{out} - stride[2]), (N, C, D_{out} + stride[0], H_{out} + stride[1], W_{out} + stride[2])]` 。
|
:math:`[(N, C, D_{out} - stride[0], H_{out} - stride[1], W_{out} - stride[2]), (N, C, D_{out} + stride[0], H_{out} + stride[1], W_{out} + stride[2])]` 。
|
||||||
|
|
||||||
输出:
|
返回:
|
||||||
shape为 :math:`(N, C, D_{out}, H_{out}, W_{out})` 或 :math:`(C, D_{out}, H_{out}, W_{out})` 的Tensor,
|
shape为 :math:`(N, C, D_{out}, H_{out}, W_{out})` 或 :math:`(C, D_{out}, H_{out}, W_{out})` 的Tensor,
|
||||||
数据类型与输入 `x` 相同。
|
数据类型与输入 `x` 相同。
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ mindspore.ops.split
|
||||||
参数:
|
参数:
|
||||||
- **x** (Tensor) - Tensor的shape为 :math:`(x_1, x_2, ..., x_R)` 。
|
- **x** (Tensor) - Tensor的shape为 :math:`(x_1, x_2, ..., x_R)` 。
|
||||||
- **split_size_or_sections** (Union[int, tuple(int), list(int)]) - 如果 `split_size_or_sections` 是int类型,
|
- **split_size_or_sections** (Union[int, tuple(int), list(int)]) - 如果 `split_size_or_sections` 是int类型,
|
||||||
`x` 将被均匀的切分成块,每块的大小为 `split_size_or_sections` ,若 `x.shape[axis]` 不能被 `split_size_or_sections` 整除,最后一块大小将小于 `split_size_or_sections` 。
|
`x` 将被均匀的切分成块,每块的大小为 `split_size_or_sections` ,若 `x.shape[axis]` 不能被 `split_size_or_sections` 整除,最后一块大小将小于 `split_size_or_sections` 。
|
||||||
如果 `split_size_or_sections` 是个list类型,`x` 将沿 `axis` 轴被切分成 `len(split_size_or_sections)` 块,大小为 `split_size_or_sections` 。
|
如果 `split_size_or_sections` 是个list类型,`x` 将沿 `axis` 轴被切分成 `len(split_size_or_sections)` 块,大小为 `split_size_or_sections` 。
|
||||||
- **axis** (int) - 指定分割轴。默认值:0。
|
- **axis** (int) - 指定分割轴。默认值:0。
|
||||||
|
|
||||||
返回:
|
返回:
|
||||||
|
|
|
@ -20,7 +20,7 @@ mindspore.ops.unique_consecutive
|
||||||
|
|
||||||
异常:
|
异常:
|
||||||
- **TypeError** - `x` 不是Tensor。
|
- **TypeError** - `x` 不是Tensor。
|
||||||
- **TypeError** - `x`的数据类型不支持。
|
- **TypeError** - `x` 的数据类型不支持。
|
||||||
- **TypeError** - `return_idx` 不是bool。
|
- **TypeError** - `return_idx` 不是bool。
|
||||||
- **TypeError** - `return_counts` 不是bool。
|
- **TypeError** - `return_counts` 不是bool。
|
||||||
- **TypeError** - `axis` 不是int。
|
- **TypeError** - `axis` 不是int。
|
||||||
|
|
|
@ -947,9 +947,9 @@ def get_error_samples_mode():
|
||||||
Returns:
|
Returns:
|
||||||
ErrorSamplesMode, The method in which erroneous samples should be processed in a dataset pipeline.
|
ErrorSamplesMode, The method in which erroneous samples should be processed in a dataset pipeline.
|
||||||
|
|
||||||
- ErrorSamplesMode.RETURN: means erroneous sample results in error raised and returned.
|
- ErrorSamplesMode.RETURN: means erroneous sample results in error raised and returned.
|
||||||
- ErrorSamplesMode.REPLACE: means erroneous sample is replaced with an internally determined sample.
|
- ErrorSamplesMode.REPLACE: means erroneous sample is replaced with an internally determined sample.
|
||||||
- ErrorSamplesMode.SKIP: means erroneous sample is skipped.
|
- ErrorSamplesMode.SKIP: means erroneous sample is skipped.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> error_samples_mode = ds.config.get_error_samples_mode()
|
>>> error_samples_mode = ds.config.get_error_samples_mode()
|
||||||
|
|
|
@ -1010,7 +1010,7 @@ def unique_consecutive(x, return_idx=False, return_counts=False, axis=None):
|
||||||
Args:
|
Args:
|
||||||
x (Tensor): The input tensor.
|
x (Tensor): The input tensor.
|
||||||
return_idx (bool, optional): Whether to return the index of where the element in the original input
|
return_idx (bool, optional): Whether to return the index of where the element in the original input
|
||||||
maps to the position in the output. Default: False.
|
maps to the position in the output. Default: False.
|
||||||
return_counts (bool, optional): Whether to return the counts of each unique element. Default: False.
|
return_counts (bool, optional): Whether to return the counts of each unique element. Default: False.
|
||||||
axis (int, optional): The dimension to apply unique. If None, the unique of the flattened input is
|
axis (int, optional): The dimension to apply unique. If None, the unique of the flattened input is
|
||||||
returned. If specified, it must be int32 or int64. Default: None.
|
returned. If specified, it must be int32 or int64. Default: None.
|
||||||
|
|
|
@ -3687,7 +3687,7 @@ def is_complex(x):
|
||||||
Return True if the data type of the tensor is complex, otherwise return False.
|
Return True if the data type of the tensor is complex, otherwise return False.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
x (Tensor) - The input tensor.
|
x (Tensor): The input tensor.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Bool, return whether the data type of the tensor is complex.
|
Bool, return whether the data type of the tensor is complex.
|
||||||
|
|
Loading…
Reference in New Issue