CircularPad3d ¬
- 类 torch.nn.CircularPad3d(padding)[来源][来源] ¬
使用输入边界的圆形填充对输入张量进行填充。
维度开头的张量值用于填充末尾,末尾的值用于填充开头。如果应用负填充,则张量的两端将被移除。
对于 N 维填充,使用
torch.nn.functional.pad()
。- 参数:
填充(int,tuple)- 填充的大小。如果为 int,则在所有边界使用相同的填充。如果为 6 元组,则使用( , , , , , )。
- 形状:
输入: 或 。
输出: 或 ,其中
示例:
>>> 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)