You could calculate the output shapes looking at the formulas in the docs 3.
If you don’t want to do that, you could just run a single iteration, add some print statements to show the output shapes, and change the number of input features accordingly.
However, if you are dealing with variable sized inputs, I would recommend to use an adaptive pooling layer, which will output a defined shape.