JBlanchon:

So what is the best practice in pytorch, directly using torch.Tensor and avoiding a ToTensor transform or using np array ?



If you have tensors and expect to read it in one go, I think it is very reasonable to just store them as tensors. It is a speed thing, too. Going from read from disk + CPU augmentation to store in memory + GPU augmentation can give a formidable speedup.
(I did this as live coding in a workshop last week 1 - in the grapevine notebooks.)
You won’t be able to read .pt files without PyTorch. To my mind, this is not too bad. They do have the advantage that they promise libtorch compatibility when you don’t have Python.
You can always use torchvision’s ToPIL transform if you want to show images. Typically, you have magnitudes more images going straight to the GPU than are being output.
There is a small caveat: Depending on the hardware characteristics, I have seen that loading smaller files + doing some decoding (preferably on the GPU) can be faster than loading larger files that have been preprocessed. (I saw this with ct scans and int16 storage vs. fp32 and the storage interface was the main limitation, so reading half as many bytes from disk was preferable.)

Best regards
Thomas