Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from torchvision.datasets import MNIST
- import numpy as np
- m_l_tr = MNIST('.', train=True, download=True, transform=None)
- X_1, y_1 = m_l_tr.train_data.numpy().reshape(X_1.shape[0], 784), m_l_tr.train_labels.numpy()
- m_l_t = MNIST('.', train=False, download=True, transform=None)
- X_2, y_2 = m_l_t.test_data.numpy().reshape(X_2.shape[0], 784), m_l_t.test_labels.numpy()
- X = np.concatenate((X_1, X_2))
- y = np.concatenate((y_1, y_2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement