Update doc for the constraints of FractionalMaxPool2d (#116261)

Fixes [#115531 ](https://github.com/pytorch/pytorch/issues/115531)
Update doc for the constraints of FractionalMaxPool2d.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/116261
Approved by: https://github.com/mikaylagawarecki
diff --git a/torch/nn/modules/pooling.py b/torch/nn/modules/pooling.py
index be4f115..3676996 100644
--- a/torch/nn/modules/pooling.py
+++ b/torch/nn/modules/pooling.py
@@ -739,9 +739,12 @@
         kernel_size: the size of the window to take a max over.
                      Can be a single number k (for a square kernel of k x k) or a tuple `(kh, kw)`
         output_size: the target output size of the image of the form `oH x oW`.
-                     Can be a tuple `(oH, oW)` or a single number oH for a square image `oH x oH`
+                     Can be a tuple `(oH, oW)` or a single number oH for a square image `oH x oH`.
+                     Note that we must have :math:`kH + oH - 1 <= H_{in}` and :math:`kW + oW - 1 <= W_{in}`
         output_ratio: If one wants to have an output size as a ratio of the input size, this option can be given.
-                      This has to be a number or tuple in the range (0, 1)
+                      This has to be a number or tuple in the range (0, 1).
+                      Note that we must have :math:`kH + (output\_ratio\_H * H_{in}) - 1 <= H_{in}`
+                      and :math:`kW + (output\_ratio\_W * W_{in}) - 1 <= W_{in}`
         return_indices: if ``True``, will return the indices along with the outputs.
                         Useful to pass to :meth:`nn.MaxUnpool2d`. Default: ``False``