Sure pytorchs conv layer has a padding argument which expects a padding size.if passing an integer the padding will be applied on each side, but you could also pass a tuple containing a separate padding size per side.