Mercurial > pylearn
comparison test_dataset.py @ 162:45427d4d64b3
bugfix in test
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 12 May 2008 17:37:36 -0400 |
parents | 60e00cce3492 |
children | 3518710e16ec |
comparison
equal
deleted
inserted
replaced
161:60e00cce3492 | 162:45427d4d64b3 |
---|---|
125 assert len(minibatch)==2 | 125 assert len(minibatch)==2 |
126 test_minibatch_size(minibatch,m.minibatch_size,len(ds),2,mi) | 126 test_minibatch_size(minibatch,m.minibatch_size,len(ds),2,mi) |
127 if type(ds)==ArrayDataSet: | 127 if type(ds)==ArrayDataSet: |
128 assert (minibatch[0][:,::2]==minibatch[1]).all() | 128 assert (minibatch[0][:,::2]==minibatch[1]).all() |
129 else: | 129 else: |
130 for i in xrange(len(minibatch[0])): | 130 for j in xrange(len(minibatch[0])): |
131 (minibatch[0][i][::2]==minibatch[1][i]).all() | 131 (minibatch[0][j][::2]==minibatch[1][j]).all() |
132 mi+=1 | 132 mi+=1 |
133 i+=len(minibatch[0]) | 133 i+=len(minibatch[0]) |
134 assert i==len(ds) | 134 assert i==len(ds) |
135 assert mi==4 | 135 assert mi==4 |
136 del minibatch,i,m,mi | 136 del minibatch,i,m,mi |