Mercurial > pylearn
comparison test_dataset.py @ 48:b6730f9a336d
Fixing MinibatchDataSet getitem
author | bengioy@grenat.iro.umontreal.ca |
---|---|
date | Tue, 29 Apr 2008 13:40:13 -0400 |
parents | a5c70dc42972 |
children | e3ac93e27e16 |
comparison
equal
deleted
inserted
replaced
47:7086cfcd8ed6 | 48:b6730f9a336d |
---|---|
17 minibatch_iterator = ds.minibatches(fieldnames=['z','y'],n_batches=1,minibatch_size=3,offset=4) | 17 minibatch_iterator = ds.minibatches(fieldnames=['z','y'],n_batches=1,minibatch_size=3,offset=4) |
18 minibatch = minibatch_iterator.__iter__().next() | 18 minibatch = minibatch_iterator.__iter__().next() |
19 print "minibatch=",minibatch | 19 print "minibatch=",minibatch |
20 for var in minibatch: | 20 for var in minibatch: |
21 print "var=",var | 21 print "var=",var |
22 print "take a slice:",ds[1:6:2] | 22 print "take a slice and look at field y",ds[1:6:2]["y"] |
23 | 23 |
24 test1() | 24 test1() |