Skip to content

Instantly share code, notes, and snippets.

@yonidavidson
Created September 11, 2017 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yonidavidson/91a6d50caa56ba4ef9cdfd0df74cc720 to your computer and use it in GitHub Desktop.
Save yonidavidson/91a6d50caa56ba4ef9cdfd0df74cc720 to your computer and use it in GitHub Desktop.
Reading from hdf5 in batches
batchsize = 1
for i in xrange(0, 500, batchsize):
indexs = train_idx[i:i+batchsize]
print indexs
print "***"
print map(lambda x: X[x], indexs)
print "XXX"
print map(lambda x: Y[x], indexs)
print "YYY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment