Solved by tom in post #2 
              
              
                Well, the specified output size is the output size, as in the documentation. 
In more detail: 
What happens is that the pooling stencil size  (aka kernel size) is determined to be (input_size+target_size-1) // target_size, i.e. rounded up. With this  Then the positions of where to apply the stencil …