For example: If you use a stride of 2 and kernel of 3 for an input of size 10, you get would get according to your formula above that the padding should be 5. That means that your output will contain mostly 0s as you have many applications of your kernel that just end up completely in the padding.