Solved by Nikronic in post #2 
              
              
                Hi, 
You can compute output size using this formula: out = floor((in - kernel + 2*padding) / stride) + 1 
So, in your case, floor((7 - 1 + 2*1) / 1) +1 = 9. There is two ways to have the identical output size, first of is to use proper kernel size which in your case it is 3 instead of 1. Second appr…