Save one channel normalized tensor to image

You can use openCV

image = output.numpy()
cv2.imwrite('image_name', image)

# And when loading the image tell cv2 that it is grayscale
cv2.imread('image_name', cv2.COLOR_BGR2GRAY)
2 Likes