Skip to content

Commit

Permalink
Merge pull request apache#859 from u1234x1234/master
Browse files Browse the repository at this point in the history
update data_iter example
  • Loading branch information
tqchen committed Dec 14, 2015
2 parents 71a7128 + 8b81bb2 commit 4efaa42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion example/python-howto/data_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
round_batch=True)

batchidx = 0
for data, label in dataiter:
for dbatch in dataiter:
data = dbatch.data[0]
label = dbatch.label[0]
pad = dbatch.pad
index = dbatch.index
print("Batch", batchidx)
print(label.asnumpy().flatten())
batchidx += 1

0 comments on commit 4efaa42

Please sign in to comment.