mindspore/docs/api/api_python/nn/mindspore.nn.ReplicationPad...

22 lines
925 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.nn.ReplicationPad1d
=============================
.. py:class:: mindspore.nn.ReplicationPad1d(padding)
根据 `padding` 对输入 `x` 的W维度上进行填充。
参数:
- **padding** (union[int, tuple]) - 填充大小如果输入为int则对所有边界进行相同大小的填充如果是tuple则为(pad_left, pad_right)。
输入:
- **x** (Tensor) - 维度为3D的Tensor。shape为 :math:`(N, C, W_{in})`
输出:
Tensor填充后的Tensorshape为 :math:`(N, C, W_{out})` 。其中 :math:`W_{out} = W_{in} + pad\_left + pad\_right`
异常:
- **TypeError** - `padding` 不是tuple或int。
- **TypeError** - `padding` 中存在不是int的元素。
- **ValueError** - `padding` 是tuple且长度不能被2整除。
- **ValueError** - `padding` 是tuple且长度和Tensor的维度不匹配。