Repository: pytorch
Issue: Setting wrong type values to `kernel_size`, `stride`, `padding` and `dilation` argument of `nn.MaxPool1d()` gets the wrong error messages saying only `tuple of ints`
Labels: low priority,module: error checking,triaged,actionable,module: python frontend

### 🐛 Describe the bug

[The doc](https://pytorch.org/docs/stable/generated/torch.nn.MaxPool1d.html) of `nn.MaxPool1d()` says `kernel_size`, `stride`, `padding` and `dilation` argument are `int` or `tuple` of `int`) as shown below:

> Parameters
> - kernel_size ([Union](https://docs.python.org/3/library/typing.html#typing.Union)[[int](https://docs.python.org/3/library/functions.html#int), [Tuple](https://docs.python.org/3/library/typing.html#typing.Tuple)[[int](https://docs.python.org/3/library/functions.html#int)]]) – The size of the sliding window, must be > 0.
> - stride ([Union](https://docs.python.org/3/library/typing.html#typing.Union)[[int](https://docs.python.org/3/library/functions.html#int), [Tuple](https://docs.python.org/3/library/typing.html#typing.Tuple)[[int](https://docs.python.org/3/library/functions.html#int)]]) – The stride of the sliding window, must be > 0. Default value is kernel_size.
> - padding ([Union](https://docs.python.org/3/library/typing.html#typing.Union)[[int](https://docs.python.org/3/library/functions.html#int), [Tuple](https://docs.python.org/3/library/typing.html#typing.Tuple)[[int](https://docs.python.org/3/library/functions.html#int)]]) – Implicit negative infinity padding to be added on both sides, must be >= 0 and <= kernel_size / 2.
> - dilation ([Union](https://docs.python.org/3/library/typing.html#typing.Union)[[int](https://docs.python.org/3/library/functions.html#int), [Tuple](https://docs.python.org/3/library/typing.html#typing.Tuple)[[int](https://docs.python.org/3/library/functions.html#int)]]) – The stride between elements within a sliding window, must be > 0.

But setting wrong type values to them gets the wrong error messages saying only `tuple of ints` as shown below. *It also happens with [nn.MaxPool2d()](https://pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html) and [nn.MaxPool3d()](https://pytorch.org/docs/stable/generated/torch.nn.MaxPool3d.html):

```python
import torch
from torch import nn

my_tensor = torch.tensor([[8., -3., 0., 1., 5., -2.]])
                                   # ↓↓
maxpool1d = nn.MaxPool1d(kernel_size=1.)
maxpool1d(input=my_tensor) # Error
                                             # ↓↓
maxpool1d = nn.MaxPool1d(kernel_size=1, stride=1.)
maxpool1d(input=my_tensor) # Error
                                              # ↓↓
maxpool1d = nn.MaxPool1d(kernel_size=1, padding=0.)
maxpool1d(input=my_tensor) # Error
                                               # ↓↓
maxpool1d = nn.MaxPool1d(kernel_size=1, dilation=1.)
convtran1d(input=my_tensor) # Error
```

> TypeError: max_pool1d(): argument 'kernel_size' (position 2) must be tuple of ints, not float

> TypeError: max_pool1d(): argument 'stride' (position 3) must be tuple of ints, not float

> TypeError: max_pool1d(): argument 'padding' (position 4) must be tuple of ints, not float

> TypeError: max_pool1d(): argument 'dilation' (position 5) must be tuple of ints, not float

So, they should be something like as shown below. *`list` of `int` also works so `list` of `int` can also be added:

> TypeError: conv_transpose1d(): argument 'stride' (position 4) must be `int` or `tuple` of `int`, but found element of type float at pos 0

> TypeError: conv_transpose1d(): argument 'padding' (position 5) must be `int` or `tuple` of `int`, but found element of type float at pos 0

> TypeError: conv_transpose1d(): argument 'output_padding' (position 6) must be `int` or `tuple` of `int`, but found element of type float at pos 0

> TypeError: conv_transpose1d(): argument 'dilation' (position 8) must be `int` or `tuple` of `int`, but found element of type float at pos 0

### Versions

```python
import torch

torch.__version__ # '2.3.0'
```

cc @malfet @albanD