Last active
April 26, 2018 21:16
-
-
Save johnolafenwa/7f5262c9680e02ba796d5ce249c5b1a5 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
# Define transformations for the test set | |
test_transformations = transforms.Compose([ | |
transforms.ToTensor(), | |
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)) | |
]) | |
# Load the test set, note that train is set to False | |
test_set = CIFAR10(root="./data", train=False, transform=test_transformations, download=True) | |
# Create a loder for the test set, note that both shuffle is set to false for the test loader | |
test_loader = DataLoader(test_set, batch_size=32, shuffle=False, num_workers=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment