pad¶
- dragon.vm.torch.nn.functional.- pad(
 input,
 pad,
 mode='constant',
 value=0
 )[source]¶
- Pad the input according to the given sizes. - The padded dimension is computed as: - The - padshould be a sequence of values, where is the last n-dimensions to pad.- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- pad (Sequence[int]) – The n-d padding sizes.
- mode ({'constant', 'reflect', 'replicate', 'circular'}, optional) – The padding mode.
- value (number, optional, default=0) – The value used in constant mode.
 
 - Returns:
- dragon.vm.torch.Tensor – The output tensor. 
 
