get_dimensions torchvision.transforms.functional.get_dimensions(img: Tensor) → list[int][source] Returns the dimensions of an image as [channels, height, width]. Parameters: () – The image to be checked.