Learn practical skills, build real-world projects, and advance your career
Updated 5 years ago
import torch
import torchvision
from torchvision.datasets import MNIST
MNIST??
dataset = MNIST(root='data', download=True)
Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
Processing...
Done!
len(dataset)
60000
test_dataset = MNIST(root='data', train=False)