I'm trying to load a .h5
file using this documentation HDF5Matrix
:
test_images = HDF5Matrix(train_path+train_file,'images')
But I'm getting this error:
KeyError: "Unable to open object (object 'images' does not exist)"
I know you need to use this syntax to call a second key in a ['train'] ['images']
dictionary.
I usually use this statement to open files .h5
:
with h5py.File(train_path+train_file, 'r') as hf:
train_images = hf['train']['images'][:]
My question is: Is it possible to access the second key to use the HDF5Matrix
syntax?
Thank you!