On this page
ReplicationPad3d
class torch.nn.ReplicationPad3d(padding)
[source]-
Pads the input tensor using replication of the input boundary.
For
N
-dimensional padding, usetorch.nn.functional.pad()
.- Parameters
-
padding (int, tuple) – the size of the padding. If is
int
, uses the same padding in all boundaries. If a 6-tuple
, uses ( , , , , , )
- Shape:
-
- Input: or .
Output: or , where
Examples:
>>> 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)
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.nn.ReplicationPad3d.html