ZeroPad3d¶
- class torch.nn.ZeroPad3d(padding)[source][source]¶
使用零值填充輸入張量的邊界。
對於 N 維的填充,請使用
torch.nn.functional.pad()
。- 形狀
輸入: or 。
輸出: 或 ,其中
範例
>>> m = nn.ZeroPad3d(3) >>> input = torch.randn(16, 3, 10, 20, 30) >>> output = m(input) >>> # using different paddings for different sides >>> m = nn.ZeroPad3d((3, 3, 6, 6, 0, 1)) >>> output = m(input)