Some defects of convNd

I want to use conv1d to do something. kernel_size = 4, stride=1, and i want the output of the conv1d has the same width with the origin input. To realize it , i need to pad 3 zero totally and it seems impossible to using conv1d to achieve this goal.
Any suggestions about how to solve this kind of problem. Thanks.

You cad use F.pad to add a different number of zeros in the left and in the right of your image (because your kernel has even size)

Thanks, it can work .