Mercurial > pylearn
changeset 508:60b7dd5be860
scrapped ulimit in smallnorb
author | James Bergstra <bergstrj@iro.umontreal.ca> |
---|---|
date | Wed, 29 Oct 2008 18:23:34 -0400 |
parents | b8e6de17eaa6 |
children | 6fe692b93b69 |
files | datasets/smallNorb.py |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/datasets/smallNorb.py Wed Oct 29 18:06:49 2008 -0400 +++ b/datasets/smallNorb.py Wed Oct 29 18:23:34 2008 -0400 @@ -32,22 +32,19 @@ with dtype=float32 or dtype=float64. """ - #set ulimit to an integer, and disable reading of the test_xxx files to load only a - #subset of the data - ulimit=None def downsample(dataset): return dataset[:, 0, ::downsample_amt, ::downsample_amt] - samples = downsample(read(open(self.train_dat), slice(None,ulimit))) + samples = downsample(read(open(self.train_dat))) samples = numpy.vstack((samples, downsample(read(open(self.test_dat))))) samples = numpy.asarray(samples, dtype=dtype) if normalize_pixels: samples *= (1.0 / 255.0) - labels = read(open(self.train_cat), slice(0,ulimit)) + labels = read(open(self.train_cat)) labels = numpy.hstack((labels, read(open(self.test_cat)))) - infos = read(open(self.train_info), slice(0,ulimit)) + infos = read(open(self.train_info)) infos = numpy.vstack((infos, read(open(self.test_info)))) return samples, labels, infos