ReplicationPad3d¶
- 类 torch.nn.ReplicationPad3d(padding)[source][source] ¶
使用输入边界的复制对输入张量进行填充。
对于 N 维填充,使用
torch.nn.functional.pad()
。- 参数:
填充(int,tuple)- 填充的大小。如果为 int,则在所有边界使用相同的填充。如果为 6 元组,则使用( , , , , , )。
- 形状:
输入: 或 。
输出: 或 ,其中
示例:
>>> m = nn.ReplicationPad3d(3) >>> input = torch.randn(16, 3, 8, 320, 480) >>> output = m(input) >>> # using different paddings for different sides >>> m = nn.ReplicationPad3d((3, 3, 6, 6, 1, 1)) >>> output = m(input)