PIL's Image or torch's read_image? #928
Unanswered
gokulnotre5
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This doubt is in reference to loading a custom image (Custom Datasets). In the notebook, torch's read_image was used. I was wondering can't we use PIL's Image. Particularly,
from PIL import Image
image=Image.open("data/04-pizza-dan_dad.jpeg")
f_transform=simple_transform(image)
f=f_transform.reshape((1,3,64,64)).to(device)
class_names[model_0(f).argmax(dim=1).item()]
My question is, which one is better?
Beta Was this translation helpful? Give feedback.
All reactions