9 lines
219 B
Python
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
|