Update docstring for scale_factor in torch.nn.functional.interpolate. (#80807)

Fixes #80786

Pull Request resolved: https://github.com/pytorch/pytorch/pull/80807
Approved by: https://github.com/ezyang
diff --git a/torch/nn/functional.py b/torch/nn/functional.py
index 2c668dd..15132ca 100644
--- a/torch/nn/functional.py
+++ b/torch/nn/functional.py
@@ -3772,7 +3772,7 @@
         size (int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int]):
             output spatial size.
         scale_factor (float or Tuple[float]): multiplier for spatial size. If `scale_factor` is a tuple,
-            its length has to match `input.dim()`.
+            its length has to match the number of spatial dimensions; `input.dim() - 2`.
         mode (str): algorithm used for upsampling:
             ``'nearest'`` | ``'linear'`` | ``'bilinear'`` | ``'bicubic'`` |
             ``'trilinear'`` | ``'area'`` | ``'nearest-exact'``. Default: ``'nearest'``