This script realizes the modification of the size of an image .
from torchvision import transforms
from PIL import Image
import matplotlib.pyplot as plt
# Enter the modified image path
img = Image.open("../leNet-master/cat.jpeg")
print(" Original size :", img.size)
# Set the pixel size of the image
img = transforms.Resize((1600, 1100))(img)
print(" Modified image size :", img.size)
# Save output
img.save('new.png')
plt.axis('off')
plt.imshow(img)
plt.show()