-
-
Save szagoruyko/27712564a3f3765c5bfd933b56a21757 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
os.execute('wget http://torch7.s3-website-us-east-1.amazonaws.com/data/svhn.t7.tgz') | |
os.execute('tar xvzf svhn.t7.tgz') | |
os.execute('rm svhn.t7.tgz') | |
local train = torch.load('./housenumbers/train_32x32.t7','ascii') | |
local extra = torch.load('./housenumbers/extra_32x32.t7','ascii') | |
local test = torch.load('./housenumbers/test_32x32.t7', 'ascii') | |
local dataset = { | |
trainData = { | |
data = torch.cat(train.X:transpose(3,4), extra.X:transpose(3,4),1), | |
size = function() return train.X:size(1) extra.X:size(1) end, | |
labels = torch.cat(train.y[1], extra.y[1], 1), | |
}, | |
testData = { | |
data = test.X:transpose(3,4), | |
size = function() return test.X:size(1) end, | |
labels = test.y[1], | |
} | |
} | |
torch.save('svhn.t7',dataset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment