You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve `test_pad_with_non_constant_padding_modes` to avoid data multiplication in `transforms.ToPILImage()` on float data:
```python
img = torch.zeros(3, 27, 27) # Float32
img[:, :, 0] = 1 # we add 1 and not 255
img = transforms.ToPILImage()(img) # This converts 1 to 255 due to [pic = pic.mul(255).byte()](https://github.com/pytorch/vision/blob/master/torchvision/transforms/functional.py#L107)
```
and thus test's correct values are [..., 200, 1, 0]
0 commit comments