(2, 384, 512) shape show with PIL

Hi I want to ask you, when I have image of this size - torch.Size([2, 384, 512]) - (it is mask for image)
How can I show image with this shape with PIL library ?

  1. Transform to PIL image ( 2 pil images for shape[0] and shape[1]). You can use torchvision.transforms
  2. image.show
1 Like