torch.Tensor: tensor of the form :math:`(C, H, W)`.
if not type(image) == np.ndarray:
raise TypeError("Input type is not a numpy.ndarray. Got {}".format(
type(image)))
if len(image.shape) > 3 or len(image.shape) < 2:
raise ValueError("Input size must be a two or three dimensional array")
tensor: torch.Tensor = torch.from_numpy(image)
if len(tensor.shape) == 2:
tensor = torch.unsqueeze(tensor, dim=-1)
return tensor.permute(2, 0, 1).squeeze_() // CxHxW