Created
December 30, 2021 20:57
-
-
Save GitHubEmploy/a507dbfe0451c5ee8bcbdfa58d37a8e2 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
# MNIST dataset | |
train_dataset = torchvision.datasets.MNIST(root='data', | |
train=True, | |
transform=transforms.ToTensor(), | |
download=True) | |
test_dataset = torchvision.datasets.MNIST(root='data', | |
train=False, | |
transform=transforms.ToTensor()) | |
# Data loader | |
train_loader = torch.utils.data.DataLoader(dataset=train_dataset, | |
batch_size=batch_size, | |
shuffle=True) | |
test_loader = torch.utils.data.DataLoader(dataset=test_dataset, | |
batch_size=batch_size, | |
shuffle=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment