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_img, dsize=(160, 120), interpolation=cv2.INTER_CUBIC)

# saving original image
cv2.imwrite("rgb_original.jpg", rgb_img)

# using torchvision to save image <- first method
rgb_img_tensor = torch.from_numpy(rgb_img).float() / 255.  # torchvision uses [0,1] range
rgb_img_tensor = rgb_img_tensor.unsqueeze(0).permute(0, 3, 1, 2)
rgb_img_tensor = rgb_img_tensor[:, [2, 1, 0], :, :]  # cv2 reads image in BGR, reversing it to RGB
vutils.save_image(rgb_img_tensor, "first_method.jpg")

# using your method to save image <- second method
rgb_img_orig = np.rollaxis(rgb_img, 2)
rgb_img_orig = torch.from_numpy(rgb_img_orig)
rgb_img_orig = rgb_img_orig.type(torch.IntTensor)
rgb_img_orig = rgb_img_orig.unsqueeze(0)
shape = rgb_img_orig.shape
rgb_img_orig = rgb_img_orig.permute(0, 2, 3, 1).reshape(shape[2], shape[3], shape[1]).cpu().numpy() #  <- permute axes here
cv2.imwrite("second_method.jpg", rgb_img_orig)