Mercurial > pylearn
changeset 845:825358a8072f
added glviewer to cifar10
author | James Bergstra <bergstrj@iro.umontreal.ca> |
---|---|
date | Thu, 22 Oct 2009 19:09:45 -0400 |
parents | b2948ae5087c |
children | c995a5127a25 |
files | pylearn/dataset_ops/cifar10.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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):