from torchvision.datasets import MNIST # import torchvision # torchvision.datasets. #准备数据集 mnist = MNIST(root="./mnist",train=True,download=True) print(mnist) mnist[0][0].show() print(len(mnist))
Dataset MNIST
Number of datapoints: 60000
Root location: ./mnist
Split: Train
60000