Yes, with 2D convolution in PyTorch, it does what’s called “valid padding” by default. That is, it won’t go over the edges. And in this case, it won’t move vertically (up or down). The output you expect to get here, from a 3x9 input with a 3x3 kernel with stride 1, is a 1x7 output