Solved by Sayed_Nadim in post #2 
              
              
                Hi, 
Your method is almost OK. You forgot to think about the permutation of the axes. 
I am giving two methods to save your image. 
import cv2
import numpy as np
import torch
import torchvision.utils as vutils

# reading image
rgb_img = cv2.imread('1.jpg')  # read any image
rgb_img = cv2.resize(rgb_…