how to avoid TO_TENSOR() clips values to 1
I have a black and white image that needs to be converted into tensor.
The shape of the image is (400, 600, 3).
Originally, the values of the image have max = 255; for example:
org_img[0]
 
# result:
array([[255, 255, 255],
               [255, 255, 255],
               [255, 255, 255],
               ...,
               [255, 255, 255],
               [255, 255, 255],
               [255, 255, 255]], dtype=uint8)

but after i convert into tensor using to_tensor(), it clips my value into 1.
torchvision.transforms.functional.to_tensor(org_img[0])
# result:
tensor([[[1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         ...,
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.]]])

This makes my image all black, how can i avoid this problem?
Thank you.

The images are not clipped but instead re-scaled from uint8 0..255 to float32 [0, 1] by ToTensor. Library such as matplotlib can naturally handle RGB images with single-precision pixel values within [0, 1] after re-scaling.
