forked from mindspore-Ecosystem/mindspore
fix api doc
This commit is contained in:
parent
d1c2ef4a73
commit
f43504a6ae
|
@ -232,7 +232,6 @@ ReWrite完整示例请参考
|
|||
|
||||
异常:
|
||||
- **RuntimeError** - 如果 `src_node` 不属于当前的SymbolTree。
|
||||
- **RuntimeError** - 如果当前节点和 `src_node` 不属于同一个SymbolTree。
|
||||
- **TypeError** - 如果参数 `arg_idx` 不是int类型。
|
||||
- **ValueError** - 如果参数 `arg_idx` 超出了当前节点的参数数量。
|
||||
- **TypeError** - 如果参数 `src_node` 不是Node类型。
|
||||
|
|
|
@ -6,7 +6,10 @@ mindspore.nn.ReplicationPad1d
|
|||
根据 `padding` 对输入 `x` 的W维度上进行填充。
|
||||
|
||||
参数:
|
||||
- **padding** (union[int, tuple]) - 填充大小,如果输入为int,则对所有边界进行相同大小的填充;如果是tuple,则为 :math:`(pad_{left}, pad_{right})`。
|
||||
- **padding** (union[int, tuple]) - 填充 `x` 最后一个维度的大小。
|
||||
|
||||
- 如果输入为int,则对所有边界进行相同大小的填充。
|
||||
- 如果是tuple,则为 :math:`(pad_{left}, pad_{right})`。
|
||||
|
||||
输入:
|
||||
- **x** (Tensor) - 维度为2D或者3D的Tensor。shape为 :math:`(C, W_{in})` 或 :math:`(N, C, W_{in})` 。
|
||||
|
|
|
@ -6,7 +6,10 @@ mindspore.nn.ReplicationPad2d
|
|||
根据 `padding` 对输入 `x` 的HW维度上进行填充。
|
||||
|
||||
参数:
|
||||
- **padding** (union[int, tuple]) - 填充大小,如果输入为int,则对所有边界进行相同大小的填充;如果是tuple,则顺序为 :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down})`。
|
||||
- **padding** (union[int, tuple]) - 填充 `x` 最后两个维度的大小。
|
||||
|
||||
- 如果输入为int,则对所有边界进行相同大小的填充。
|
||||
- 如果是tuple,则顺序为 :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down})`。
|
||||
|
||||
输入:
|
||||
- **x** (Tensor) - 维度为3D或4D的Tensor,shape为 :math:`(C, H_{in}, W_{out})` 或 :math:`(N, C, H_{in}, W_{in})` 。
|
||||
|
|
|
@ -6,7 +6,10 @@ mindspore.nn.ReplicationPad3d
|
|||
根据 `padding` 对输入 `x` 的DHW维度上进行填充。
|
||||
|
||||
参数:
|
||||
- **padding** (union[int, tuple]) - 填充大小,如果输入为int,则对所有边界进行相同大小的填充;如果是tuple,则顺序为 :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down}, pad_{front}, pad_{back})`。
|
||||
- **padding** (union[int, tuple]) - 填充 `x` 最后三个维度的大小。
|
||||
|
||||
- 如果输入为int,则对所有边界进行相同大小的填充。
|
||||
- 如果是tuple,则顺序为 :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down}, pad_{front}, pad_{back})`。
|
||||
|
||||
输入:
|
||||
- **x** (Tensor) - 维度为4D或5D的Tensor,shape为 :math:`(C, D_{in}, H_{in}, W_{in})` 或 :math:`(N, C, D_{in}, H_{in}, W_{in})` 。
|
||||
|
|
|
@ -660,8 +660,10 @@ class ReplicationPad1d(_ReplicationPadNd):
|
|||
Pad on W dimension of input `x` according to `padding`.
|
||||
|
||||
Args:
|
||||
padding (union[int, tuple]): the size of the padding. If is `int`, uses the same
|
||||
padding in all boundaries. If is tuple, uses :math:`(pad_{left}, pad_{right})` to pad.
|
||||
padding (union[int, tuple]): The padding size to pad the last dimension of `x` .
|
||||
|
||||
- If `padding` is an integer, all directions will be padded with the same size.
|
||||
- If `padding` is a tuple, uses :math:`(pad_{left}, pad_{right})` to pad.
|
||||
|
||||
Inputs:
|
||||
- **x** (Tensor) - 2D or 3D, shape: :math:`(C, W_{in})` or :math:`(N, C, W_{in})`.
|
||||
|
@ -716,8 +718,10 @@ class ReplicationPad2d(_ReplicationPadNd):
|
|||
Pad on HW dimension of input `x` according to `padding`.
|
||||
|
||||
Args:
|
||||
padding (union[int, tuple]): the size of the padding. If is `int`, uses the same padding in all boundaries.
|
||||
If a 4-`tuple`, uses :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down})` to pad.
|
||||
padding (union[int, tuple]): The padding size to pad the last two dimension of `x` .
|
||||
|
||||
- If `padding` is an integer, all directions will be padded with the same size.
|
||||
- If `padding` is a tuple, uses :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down})` to pad.
|
||||
|
||||
Inputs:
|
||||
- **x** (Tensor) - 3D or 4D, shape: :math:`(C, H_{in}, W_{out})` or :math:`(N, C, H_{out}, W_{out})`.
|
||||
|
@ -781,8 +785,11 @@ class ReplicationPad3d(_ReplicationPadNd):
|
|||
Pad on DHW dimension of input `x` according to `padding`.
|
||||
|
||||
Args:
|
||||
padding (union[int, tuple]): the size of the padding. If is `int`, uses the same padding in all boundaries.
|
||||
If a 6-`tuple`, uses :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down}, pad_{front}, pad_{back})`.
|
||||
padding (union[int, tuple]): The padding size to pad the last three dimension of `x` .
|
||||
|
||||
- If `padding` is an integer, all directions will be padded with the same size.
|
||||
- If `padding` is a tuple, uses :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down},
|
||||
pad_{front}, pad_{back})` to pad.
|
||||
|
||||
Inputs:
|
||||
- **x** (Tensor) - 4D or 5D,
|
||||
|
|
|
@ -502,7 +502,7 @@ def ravel(x):
|
|||
>>> x = Tensor(np.array([[0, 1], [2, 1]]).astype(np.float32))
|
||||
>>> output = ops.ravel(x)
|
||||
>>> print(output)
|
||||
[0, 1, 2, 1]
|
||||
[0. 1. 2. 1]
|
||||
>>> print(output.shape)
|
||||
(4,)
|
||||
"""
|
||||
|
|
|
@ -175,7 +175,6 @@ class Node:
|
|||
|
||||
Raises:
|
||||
RuntimeError: If `src_node` is not belong to current `SymbolTree`.
|
||||
RuntimeError: If current node and `src_node` is not belong to same `SymbolTree`.
|
||||
TypeError: If `arg_idx` is not a `int` number.
|
||||
ValueError: If `arg_idx` is out of range.
|
||||
TypeError: If `src_node` is not a `Node` instance.
|
||||
|
|
Loading…
Reference in New Issue