Closed Fly2flies closed 3 years ago
Different from the official implementation of ToTensor() in PyTorch, this Totensor() class doesn't normalize the values to [0,1] . It just converts PIL data to torch tensor format.
Different from the official implementation of ToTensor() in PyTorch, this Totensor() class doesn't normalize the values to [0,1] . It just converts PIL data to torch tensor format.
Ok, I got it. Thanks for your reply.
Thanks for sharing the great code base. But I still have a little puzzle: in the get_mean(), the mean is [114.7748, 107.7354, 99.4750]. It looks like this is for images with input ranges from 0 to 255. But in the normalization for input image
after
ToTensor()
, the value becomes [0,1]. Is this appropriate for subsequent video classifications? Do we need to swap the order of these two operations ?