Learn practical skills, build real-world projects, and advance your career
pip install jovian --upgrade
The following command must be run outside of the IPython shell: $ pip install jovian --upgrade The Python package manager (pip) can only be used from outside of IPython. Please reissue the `pip` command in a separate terminal or command prompt. See the Python documentation for more information on how to install packages: https://docs.python.org/3/installing/
import numpy as np
import torch
from torchvision.datasets import MNIST
dataset = MNIST(root = '/data', download = True)
Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to /data\MNIST\raw\train-images-idx3-ubyte.gz
99%|██████████████████████████████████████████████████████████████████▎| 9805824/9912422 [00:13<00:00, 2842206.12it/s]
Extracting /data\MNIST\raw\train-images-idx3-ubyte.gz Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz to /data\MNIST\raw\train-labels-idx1-ubyte.gz
0it [00:00, ?it/s] 0%| | 0/28881 [00:03<?, ?it/s] 32768it [00:03, 10038.32it/s]
Extracting /data\MNIST\raw\train-labels-idx1-ubyte.gz Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz to /data\MNIST\raw\t10k-images-idx3-ubyte.gz
0it [00:00, ?it/s] 0%| | 0/1648877 [00:00<?, ?it/s] 2%|█▍ | 32768/1648877 [00:00<00:05, 291577.73it/s] 6%|████▏ | 98304/1648877 [00:00<00:04, 325025.32it/s] 12%|████████▌ | 204800/1648877 [00:00<00:03, 408399.46it/s] 22%|███████████████▍ | 368640/1648877 [00:00<00:02, 510613.64it/s] 32%|█████████████████████▉ | 524288/1648877 [00:00<00:01, 638950.29it/s] 44%|██████████████████████████████▌ | 729088/1648877 [00:00<00:01, 805039.09it/s] 60%|████████████████████████████████████████▌ | 983040/1648877 [00:00<00:00, 1010144.23it/s] 72%|███████████████████████████████████████████████▉ | 1179648/1648877 [00:01<00:00, 1166980.17it/s] 83%|███████████████████████████████████████████████████████▉ | 1376256/1648877 [00:01<00:00, 1288185.83it/s] 96%|████████████████████████████████████████████████████████████████▏ | 1581056/1648877 [00:01<00:00, 1443836.63it/s] 1654784it [00:01, 1242311.86it/s]
Extracting /data\MNIST\raw\t10k-images-idx3-ubyte.gz Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz to /data\MNIST\raw\t10k-labels-idx1-ubyte.gz
0it [00:00, ?it/s] 0%| | 0/4542 [00:00<?, ?it/s] 8192it [00:00, 48533.72it/s]
Extracting /data\MNIST\raw\t10k-labels-idx1-ubyte.gz Processing... Done!
len(dataset)
60000
9920512it [00:30, 2842206.12it/s]
test_data = MNIST(root = '/data', train = False)
len(test_data)
10000