torch.nn.functional.pad
torch.nn.functional.pad(input, pad, mode='constant', value=None) -> Tensor
Pads tensor.
Padding size:
      The padding size by which to pad some dimensions of "input" are
      described starting from the last dimension and moving forward.
      \left\lfloor\frac{\text{len(pad)}}{2}\right\rfloor dimensions of
      "input" will be padded. For example, to pad only the last
      dimension of the input tensor, then "pad" has the form
      (\text{padding_left}, \text{padding_right}); to pad the last 2
      dimensions of the input tensor, then use (\text{padding_left},
      \text{padding_right}, \text{padding_top},
      \text{padding_bottom}); to pad the last 3 dimensions, use
      (\text{padding_left}, \text{padding_right},
      \text{padding_top}, \text{padding_bottom}
      \text{padding_front}, \text{padding_back}).
Padding mode:
      See "torch.nn.ConstantPad2d", "torch.nn.ReflectionPad2d", and