Skip to content

Instantly share code, notes, and snippets.

@Lexie88rus
Created June 27, 2019 08:16
Show Gist options
  • Save Lexie88rus/048d08f0e056b9586c893e5e6dc06602 to your computer and use it in GitHub Desktop.
Save Lexie88rus/048d08f0e056b9586c893e5e6dc06602 to your computer and use it in GitHub Desktop.
Preparing the dataset
# Define a transform
transform = transforms.Compose([transforms.ToTensor()])
# Download and load the training data for Fashion MNIST
trainset = datasets.FashionMNIST('~/.pytorch/F_MNIST_data/', download=True, train=True, transform=transform)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=64, shuffle=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment