-
-
Save szagoruyko/8467ee15d020ab2a7ce80a215af71b74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local mnist = require 'mnist' | |
local train = mnist.traindataset() | |
local test = mnist.testdataset() | |
local dataset = { | |
trainData = { | |
data = train.data:double():view(train.label:numel(),1,28,28) / 256, | |
labels = train.label:double() + 1, | |
}, | |
testData = { | |
data = test.data:double():view(test.label:numel(),1,28,28) / 256, | |
labels = test.label:double() + 1, | |
}, | |
} | |
torch.save('mnist.t7', dataset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment