Out of filter tensor shape

Is there any function to calculate the out shape a filter would give to an input:

As an examples:

nn.MaxPool2d(3, stride=2).outshape()

Thank you,

The output shape of a polling layer depends on the input shape.
You could pass a random tensor to the module and print(out.shape) to get the shape for this setup.