changeset 847:77e6b2d3e5e5

fixed typo in mnist glviewer
author James Bergstra <bergstrj@iro.umontreal.ca>
date Thu, 22 Oct 2009 19:10:15 -0400
parents c995a5127a25
children e7d1dd6a9785 cfdaa56c66e8
files pylearn/dataset_ops/MNIST.py
diffstat 1 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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()