ConstantPad1d¶
- class dragon.vm.torch.nn.ConstantPad1d(
 padding,
 value
 )[source]¶
- Pad input according to the last dimension with a constant. - The padded dimension is computed as: \[\text{Dim}_{out} = \text{Dim}_{in} + pad_l + pad_r \]- Examples: - m = torch.nn.ConstantPad1d(1, 2) x = torch.randn(1, 2) y = m(x) # (1, 2) -> (1, 4) - See also 
