Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. from torchvision.datasets import MNIST
  2. import numpy as np
  3.  
  4. m_l_tr = MNIST('.', train=True, download=True, transform=None)
  5. X_1, y_1 = m_l_tr.train_data.numpy().reshape(X_1.shape[0], 784), m_l_tr.train_labels.numpy()
  6.  
  7. m_l_t = MNIST('.', train=False, download=True, transform=None)
  8. X_2, y_2 = m_l_t.test_data.numpy().reshape(X_2.shape[0], 784), m_l_t.test_labels.numpy()
  9.  
  10. X = np.concatenate((X_1, X_2))
  11. y = np.concatenate((y_1, y_2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement