Closed Max-ChenFei closed 6 months ago
img = np.array(pic, copy=True)
img = torch.as_tensor(img)
img = img.view(pic.size[1], pic.size[0], F_pil.get_image_num_channels(pic))
# put it from HWC to CHW format
img = img.permute((2, 0, 1))
from tensorflow gpu float 0-1 -> torch float32 full range gpu
Task1: torch tensor on GPU -> tensorflow tensor on GPU
more related visualization