Hi woals2274,
The pytorch conv modules apply only symmetric padding to the input, thus can’t be used to create ‘same’ padding for even sized kernels.
You could instead apply unsymmetric padding to the input using the following code
import torch
input_data = torch.rand(5,256,4,64,64)
pad = torch.nn.ConstantPad3d((1,1,1,1,2,1), 0)
conv = torch.nn.Conv3d(256, 128, kernel_size=(4,3,3), padding=0, stride=1)
print("Input Data size:{}\nOutput Data size:{}".format(conv(pad(input_data)).size()))