# HG changeset patch # User James Bergstra # Date 1256252985 14400 # Node ID 825358a8072faeecaffb7f517ad6f5f2112bacc7 # Parent b2948ae5087c1a07c97d57b9aff1e77b9e286a57 added glviewer to cifar10 diff -r b2948ae5087c -r 825358a8072f pylearn/dataset_ops/cifar10.py --- a/pylearn/dataset_ops/cifar10.py Thu Oct 22 19:09:27 2009 -0400 +++ b/pylearn/dataset_ops/cifar10.py Thu Oct 22 19:09:45 2009 -0400 @@ -37,6 +37,10 @@ return _unpickle(os.path.join(data_root(), 'cifar10', 'cifar-10-batches-py', 'test_batch'), dtype) +def forget(): + train_data_labels.forget() + test_data_labels.forget() + # functions for TensorFnDataset @@ -154,6 +158,12 @@ nclasses = 10 +def glviewer(split='train'): + from glviewer import GlViewer + i = theano.tensor.iscalar() + f = theano.function([i], cifar10(i, split, dtype='uint8', rasterized=False, color='rgb')[0]) + GlViewer(f).main() + if 0: def datarow_to_greyscale_28by28(row, max_scale=1.0):