ToTorchTensor#
module : eotorchloader.transform.tensor
- class ToTorchTensor(img_only: bool = False, mask_only: bool = False)#
Convert (image, mask) sample from numpy array to torch tensor
Note
Output type cast to torch.float32
- Parameters
img_only (str) – Apply transform only to image
mask_only (List(Int)) – Apply transform only to mask
see TensorToArray