value
)[source]

Pad input according to the last 2-dimensions with a constant.

The padded dimension is computed as:

$\text{Dim}_{out} = \text{Dim}_{in} + pad_l + pad_r$

Examples:

x = torch.randn(1, 2, 2)
y = m(x)  # (1, 2, 2) -> (1, 4, 4)