Commit dee2c5de authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[test] added test for ToTensor transform on grayscale images

parent 45246db3
Pipeline #26543 passed with stage
in 12 minutes and 52 seconds
......@@ -111,6 +111,11 @@ def test_transforms():
tt = ToTensor()
assert isinstance(sample['image'], torch.Tensor)
# grayscale
image_gray = numpy.random.rand(128, 128).astype("uint8")
sample_gray = {'image': image_gray}
assert isinstance(sample['image'], torch.Tensor)
from ..datasets import Normalize
image_copy = torch.Tensor(sample['image'])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment