ml_lib/utils/transforms.py
2020-05-17 22:05:20 +02:00

9 lines
219 B
Python

from torchvision.transforms import ToTensor as TorchVisionToTensor
class ToTensor(TorchVisionToTensor):
def __call__(self, pic):
tensor = super(ToTensor, self).__call__(pic).float()
return tensor