img = image_batch[0].mul(255).byte()
img = img.cpu().numpy().transpose((1, 2, 0))
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
# print("img",img)
cv2.imshow("12",img)
cv2.waitKey(0)
pytorch_一个batch的tensor转化为图片查看
于 2022-04-16 15:51:16 首次发布