Data in Cifar10 dataset, torchvision.datasets shown as decimal values

I imported Cifar10 dataset from torchvision.datasets, I was expecting the pixel values should be between [0-255], but I can see values as decimal. I belive I havent done any normalization.

Is it the correct data which I am seeing, or some transformations are happening on it?

below is the code,

transforms.ToTensor normalizes the tensors to the range [0, 1] as described in the docs.

oh yeah, true. Thank you @ptrblck

@ptrblck Also I was wondering how does the lables get converted to one_hot_endcoding, although I didnt do any one_hot_encoding for labels seperately but model absolutely fine. is there anything that does one_hot_encoding for labels? Thank You:)

If you are working on a multi-class classification, which I assume since you are using the CIFAR10 dataset, then the target is expected in the shape [batch_size] containing the class indices in the range [0, nb_classes-1], so it’s not one-hour encoded.
The torchvision.datasets` CIFAR10 dataset will return the target in the expected format.