mindspore.nn.ReplicationPad3d ============================= .. py:class:: mindspore.nn.ReplicationPad3d(padding) 根据 `padding` 对输入 `x` 的DHW维度进行填充。 .. warning:: 从2.9.0(不含)之后版本开始,前向输入 `x` 将改为 `input`。 参数: - **padding** (union[int, tuple]) - 填充 `x` 最后三个维度的大小。 - 如果输入为int,则对所有边界进行相同大小的填充。 - 如果是tuple,则顺序为 :math:`(\text{padding_left}, \text{padding_right}, \text{padding_top}, \text{padding_bottom}, \text{padding_front}, \text{padding_back})`。 输入: - **x** (Tensor) - 维度为4D或5D的Tensor,shape为 :math:`(C, D_{in}, H_{in}, W_{in})` 或 :math:`(N, C, D_{in}, H_{in}, W_{in})` 。 输出: Tensor,填充后的Tensor,shape为 :math:`(C, D_{out}, H_{out}, W_{out})` 或 :math:`(N, C, D_{out}, H_{out}, W_{out})`。 其中 :math:`D_{out} = D_{in} + \text{padding_front} + \text{padding_back}`、 :math:`H_{out} = H_{in} + \text{padding_top} + \text{padding_bottom}`、 :math:`W_{out} = W_{in} + \text{padding_left} + \text{padding_right}`。 异常: - **TypeError** - `padding` 不是tuple或int。 - **TypeError** - `padding` 中存在不是int的元素。 - **ValueError** - `padding` 是tuple,且长度不能被2整除。 - **ValueError** - `padding` 是tuple,且长度和Tensor的维度不匹配。