Hello,

I don’t know how to computer the output shape when **ceil_model=True** in MaxPool2d.

class torch.nn.MaxPool2d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)

Thank you in advance!

Hello,

I don’t know how to computer the output shape when **ceil_model=True** in MaxPool2d.

class torch.nn.MaxPool2d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)

Thank you in advance!

The docs say the output shape is calculated with the following formula…

```
H_out=floor((H_in+2∗padding[0]−dilation[0]∗(kernel_size[0]−1)−1)/stride[0]+1)
```

So for ceil_mode just replace `floor`

with `ceil`

in the above calculation.

Besides you probably don’t want to be looking at the docs for the development version of pytorch.

The link for the docs for pytorch 0.3.1 is http://pytorch.org/docs/0.3.1/