# HG changeset patch # User James Bergstra # Date 1224799581 14400 # Node ID 11e0357f06f41d37bac416a44238eaa841df8768 # Parent 40c8a46b3da7dd8b293573df902406d10588d7f9 typo in MNIST.train_valid_test diff -r 40c8a46b3da7 -r 11e0357f06f4 datasets/MNIST.py --- a/datasets/MNIST.py Thu Oct 23 18:05:46 2008 -0400 +++ b/datasets/MNIST.py Thu Oct 23 18:06:21 2008 -0400 @@ -25,12 +25,8 @@ return dat.input, numpy.asarray(dat.target, dtype='int64').reshape(dat.target.shape[0]) -def all(path=None): - return head(n=None, path=path) - - -def train_valid_test(path=None, ntrain=50000, nvalid=10000, ntest=10000): - all_x, all_targ = all(path=path) +def train_valid_test(ntrain=50000, nvalid=10000, ntest=10000, path=None): + all_x, all_targ = head(ntrain+nvalid+ntest, path=path) train = all_x[0:ntrain], all_targ[0:ntrain] valid = all_x[ntrain:ntrain+nvalid], all_targ[ntrain:ntrain+nvalid] @@ -38,3 +34,7 @@ return train, valid, test +def all(path=None): + return head(n=None, path=path) + +