Repository: pytorch
Issue: Setting wrong type values to `stride`, `padding`, `output_padding` and `dilation` argument of `nn.ConvTranspose1d()` gets the wrong error messages saying only `tuple of ints`
Labels: module: nn,triaged

### 🐛 Describe the bug

[The doc](https://pytorch.org/docs/stable/generated/torch.nn.ConvTranspose1d.html) of `nn.ConvTranspose1d()` says `stride`, `padding`, `output_padding` and `dilation` argument are (`int` or `tuple`, optional) as shown below:

> Parameters
> - ...
> - stride ([int](https://docs.python.org/3/library/functions.html#int) or [tuple](https://docs.python.org/3/library/stdtypes.html#tuple), optional) – Stride of the convolution. Default: 1
> - padding ([int](https://docs.python.org/3/library/functions.html#int) or [tuple](https://docs.python.org/3/library/stdtypes.html#tuple), optional) – dilation * (kernel_size - 1) - padding zero-padding will be added to both sides of the input. Default: 0
> - output_padding ([int](https://docs.python.org/3/library/functions.html#int) or [tuple](https://docs.python.org/3/library/stdtypes.html#tuple), optional) – Additional size added to one side of the output shape. Default: 0
> - ...
> - dilation ([int](https://docs.python.org/3/library/functions.html#int) or [tuple](https://docs.python.org/3/library/stdtypes.html#tuple), optional) – Spacing between kernel elements. Default: 1

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.ConvTranspose2d()](https://pytorch.org/docs/stable/generated/torch.nn.ConvTranspose2d.html) and [nn.ConvTranspose3d()](https://pytorch.org/docs/stable/generated/torch.nn.ConvTranspose3d.html):

```python
import torch
from torch import nn

my_tensor = torch.tensor([[8., -3., 0., 1., 5., -2.]])
                                                                                   # ↓↓
convtran1d = nn.ConvTranspose1d(in_channels=1, out_channels=3, kernel_size=1, stride=1.)
convtran1d(input=my_tensor) # Error
                                                                                     # ↓↓
convtran1d = nn.ConvTranspose1d(in_channels=1, out_channels=3, kernel_size=1, padding=0.)
convtran1d(input=my_tensor) # Error
                                                                                           # ↓↓
convtran1d = nn.ConvTranspose1d(in_channels=1, out_channels=3, kernel_size=1, output_padding=0.)
convtran1d(input=my_tensor) # Error
                                                                                     # ↓↓
convtran1d = nn.ConvTranspose1d(in_channels=1, out_channels=3, kernel_size=1, dilation=1.)
convtran1d(input=my_tensor) # Error
```

> TypeError: conv_transpose1d(): argument 'stride' (position 4) must be tuple of ints, but found element of type float at pos 0

> TypeError: conv_transpose1d(): argument 'padding' (position 5) must be tuple of ints, but found element of type float at pos 0

> TypeError: conv_transpose1d(): argument 'output_padding' (position 6) must be tuple of ints, but found element of type float at pos 0

> TypeError: conv_transpose1d(): argument 'dilation' (position 8) must be tuple of ints, but found element of type float at pos 0

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 @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki