(path)
| 20 | return getMNISTFormat('../large_files/fashionmnist/fashion-mnist_train.csv') |
| 21 | |
| 22 | def getMNISTFormat(path): |
| 23 | # MNIST data: |
| 24 | # column 0 is labels |
| 25 | # column 1-785 is data, with values 0 .. 255 |
| 26 | # total size of CSV: (42000, 1, 28, 28) |
| 27 | train = pd.read_csv(path).values.astype(np.float32) |
| 28 | train = shuffle(train) |
| 29 | |
| 30 | Xtrain = train[:-1000,1:] / 255.0 |
| 31 | Ytrain = train[:-1000,0].astype(np.int32) |
| 32 | |
| 33 | Xtest = train[-1000:,1:] / 255.0 |
| 34 | Ytest = train[-1000:,0].astype(np.int32) |
| 35 | return Xtrain, Ytrain, Xtest, Ytest |
| 36 | |
| 37 | def getKaggleMNIST3D(): |
| 38 | Xtrain, Ytrain, Xtest, Ytest = getKaggleMNIST() |
no outgoing calls
no test coverage detected