I would like to use a padding module which is already implemented in Torch (nn.Padding), but I get an error message when I use the padding module which exists in torch.legacy.nn:

TypeError: ‘Padding’ object is not callable

Does anyone know how to use this? Or is there a module which can replace it?