In MaxPool2D the padding is by default set to 0 and the ceil_mode is also set to False. Now, if I have an input of size 7x7 with kernel=2,stride=2 the output shape becomes 3x3, but when I use ceil_mode=True, it becomes 4x4, which makes sense because (if the following formula is correct), for 7x7 with output_shape would be 3.5x3.5 and depending on the ceil_mode it would be either 3x3 or 4x4.

Now, my question is, if the ceil_mode=True, does it change the default padding?
Also, what’s the default value for filling the padded cells?
If it does, then how is it adding the padding i.e. is it adding the padding on left first or right, up first or down?
Also, what’s the default value for filling the padded cells?