senarvi / theanolm

TheanoLM is a recurrent neural network language modeling tool implemented using Theano
Apache License 2.0
81 stars 29 forks source link

Migrate from .npz to HDF5 #11

Closed senarvi closed 8 years ago

senarvi commented 8 years ago

import h5py

h5f = h5py.File(filename, 'w') h5f.create_dataset('x', data=x) h5f.close()

h5f = h5py.File(filename, 'r') x = h5f['x'][:] h5f.close()