# HG changeset patch # User James Bergstra # Date 1256253015 14400 # Node ID 77e6b2d3e5e576ccc243a6fba991357798848480 # Parent c995a5127a250679413f85947d5ceacabf90c4b9 fixed typo in mnist glviewer diff -r c995a5127a25 -r 77e6b2d3e5e5 pylearn/dataset_ops/MNIST.py --- a/pylearn/dataset_ops/MNIST.py Thu Oct 22 19:10:00 2009 -0400 +++ b/pylearn/dataset_ops/MNIST.py Thu Oct 22 19:10:15 2009 -0400 @@ -109,18 +109,11 @@ return x, y nclasses = 10 -def glviewer(part='train'): +def glviewer(split='train'): from glviewer import GlViewer - if part == 'train': - if 0: - #hack that doesn't use the op - x = get_train_img_u8_rasterized().reshape((60000, 28, 28)) - GlViewer(x.__getitem__).main() - else: - # test that uses the op - i = theano.tensor.iscalar() - f = theano.function([i], mnist(i, 'train', dtype='uint8', rasterized=False)) - GlViewer(f).main() + i = theano.tensor.iscalar() + f = theano.function([i], mnist(i, split, dtype='uint8', rasterized=False)[0]) + GlViewer(f).main()