-
-
Save cosmic-cortex/10699fd280124e8420e7155d2869be5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
from torchvision import transforms as T | |
image = Image.open('cat.jpg') | |
transform = T.Compose([T.Resize((224, 224)), T.ToTensor()]) | |
X = transform(image).unsqueeze(dim=0).to(device) | |
out = model(X) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment