get_dimensions
-
torchvision.transforms.functional.
get_dimensions
(img: torch.Tensor) → List[int][source] Returns the dimensions of an image as [channels, height, width].
- Parameters
img (PIL Image or Tensor) – The image to be checked.
- Returns
The image dimensions.
- Return type
List[int]