fix device issue
# What does this PR do?

When this block is run
```
        if isinstance(target_sizes, List):
            img_h = torch.Tensor([i[0] for i in target_sizes])
            img_w = torch.Tensor([i[1] for i in target_sizes])
```
`scale_fct` (defined a few line below) is always on `cpu`. We need to put it on the proper device.
_The documentation is not available anymore as the PR was closed or merged._<|||||>@alaradirik Only for those post-processing with this block
```python
        if isinstance(target_sizes, List):
            img_h = torch.Tensor([i[0] for i in target_sizes])
            img_w = torch.Tensor([i[1] for i in target_sizes])
```
have to be fixed.

If there is only `img_h, img_w = target_sizes.unbind(1)`, I think it is fine (will be on the correct device already).

Do you have a link to a place that you think need to be fixed but not done in this PR yet?<|||||>> @alaradirik Only for those post-processing with this block
> 
> ```python
>         if isinstance(target_sizes, List):
>             img_h = torch.Tensor([i[0] for i in target_sizes])
>             img_w = torch.Tensor([i[1] for i in target_sizes])
> ```
> 
> have to be fixed.


@ydshieh that makes sense, and we are assuming that the input `target_sizes` is on the correct device, right?<|||||>
> @ydshieh that makes sense, and we are assuming that the input `target_sizes` is on the correct device, right?

Yes, as so far we don't have CI failure from that one, so we should be good.<|||||>
> @ydshieh that makes sense, and we are assuming that the input `target_sizes` is on the correct device, right?

Yes, as so far we don't have CI failure from that one, so we should be good.