CircularPad3d¶
- class torch.nn.CircularPad3d(padding)[源][源]¶
使用输入边界的循环填充来填充输入张量。
维度开头处的张量值用于填充末尾,末尾处的值用于填充开头。如果应用负填充,则张量的末端会被移除。
对于 N 维填充,请使用
torch.nn.functional.pad()
。- 形状
输入: 或 。
输出: 或 ,其中
示例
>>> m = nn.CircularPad3d(3) >>> input = torch.randn(16, 3, 8, 320, 480) >>> output = m(input) >>> # using different paddings for different sides >>> m = nn.CircularPad3d((3, 3, 6, 6, 1, 1)) >>> output = m(input)