Solved by ptrblck in post #2 
              
              
                The second example is using basically a 2D convolution where the kernel height is equal to the input height. 
This code should yield the desired results: 
batch_size = 1
channels = 1
height = 3
length = 10
kernel_size = (height, 5)

x = torch.randn(batch_size, channels, height, length)

conv = nn.Co…