fix replicationpad doc

This commit is contained in:
yuzhenhua 2023-02-22 10:43:08 +08:00
parent 2bb8db23e1
commit 371bcd29a4
3 changed files with 11 additions and 8 deletions

View File

@ -6,13 +6,14 @@ mindspore.nn.ReplicationPad1d
根据 `padding` 对输入 `x` 的W维度上进行填充。
参数:
- **padding** (union[int, tuple]) - 填充大小如果输入为int则对所有边界进行相同大小的填充如果是tuple则为(pad_left, pad_right)。
- **padding** (union[int, tuple]) - 填充大小如果输入为int则对所有边界进行相同大小的填充如果是tuple则为 :math:`(pad_{left}, pad_{right})`
输入:
- **x** (Tensor) - 维度为3D的Tensor。shape为 :math:`(N, C, W_{in})`
- **x** (Tensor) - 维度为2D或者3D的Tensor。shape为 :math:`(C, W_{in})` :math:`(N, C, W_{in})`
输出:
Tensor填充后的Tensorshape为 :math:`(N, C, W_{out})` 。其中 :math:`W_{out} = W_{in} + pad\_left + pad\_right`
Tensor填充后的Tensorshape为 :math:`(C, W_{out})`:math:`(N, C, W_{out})`
其中 :math:`W_{out} = W_{in} + pad_{left} + pad_{right}`
异常:
- **TypeError** - `padding` 不是tuple或int。

View File

@ -9,10 +9,11 @@ mindspore.nn.ReplicationPad2d
- **padding** (union[int, tuple]) - 填充大小如果输入为int则对所有边界进行相同大小的填充如果是tuple则顺序为 :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down})`
输入:
- **x** (Tensor) - 维度为4D的Tensorshape为 :math:`(N, C, H_{in}, W_{in})`
- **x** (Tensor) - 维度为3D或4D的Tensorshape为 :math:`(C, H_{in}, W_{out})` :math:`(N, C, H_{in}, W_{in})`
输出:
Tensor填充后的Tensorshape为 :math:`(N, C, H_{out}, W_{out})`。其中 :math:`H_{out} = H_{in} + pad_{up} + pad_{down}`, :math:`W_{out} = W_{in} + pad_{left} + pad_{right}`
Tensor填充后的Tensorshape为 :math:`(C, H_{out}, W_{out})`:math:`(N, C, H_{out}, W_{out})`
其中 :math:`H_{out} = H_{in} + pad_{up} + pad_{down}`, :math:`W_{out} = W_{in} + pad_{left} + pad_{right}`
异常:
- **TypeError** - `padding` 不是tuple或int。

View File

@ -6,13 +6,14 @@ mindspore.nn.ReplicationPad3d
根据 `padding` 对输入 `x` 的DHW维度上进行填充。
参数:
- **padding** (union[int, tuple]) - 填充大小如果输入为int则对所有边界进行相同大小的填充如果是tuple则顺序为 :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down})`。
- **padding** (union[int, tuple]) - 填充大小如果输入为int则对所有边界进行相同大小的填充如果是tuple则顺序为 :math:`(pad_{left}, pad_{right}, pad_{up}, pad_{down}, pad_{front}, pad_{back})`。
输入:
- **x** (Tensor) - 维度为5D的Tensorshape为 :math:`(N, C, D_{in}, H_{in}, W_{in})`
- **x** (Tensor) - 维度为4D或5D的Tensorshape为 :math:`(C, D_{in}, H_{in}, W_{in})` :math:`(N, C, D_{in}, H_{in}, W_{in})`
输出:
Tensor填充后的Tensorshape为 :math:`(N, C, D_{out}, H_{out}, W_{out})`。其中 :math:`D_{out} = D_{in} + pad_{front} + pad_{back}`, :math:`H_{out} = H_{in} + pad_{up} + pad_{down}`, :math:`W_{out} = W_{in} + pad_{left} + pad_{right}`
Tensor填充后的Tensorshape为 :math:`(C, D_{out}, H_{out}, W_{out})`:math:`(N, C, D_{out}, H_{out}, W_{out})`
其中 :math:`D_{out} = D_{in} + pad_{front} + pad_{back}`, :math:`H_{out} = H_{in} + pad_{up} + pad_{down}`, :math:`W_{out} = W_{in} + pad_{left} + pad_{right}`
异常:
- **TypeError** - `padding` 不是tuple或int。