Hdf5 does not support opening in other browsers. It is recommended to write a piece of code to read it and see what data sets are in it. The code is as follows:

# Read all data sets in the HDF5 file
def traverse_datasets(hdf_file) :
    import h5py

    def h5py_dataset_iterator(g, prefix=' ') :
        for key in g.keys():
            item = g[key]
            path = '{} / {}'.format(prefix, key)
            if isinstance(item, h5py.Dataset): # test for dataset
                yield (path, item)
            elif isinstance(item, h5py.Group): # test for group (go down)
                yield from h5py_dataset_iterator(item, path)

    with h5py.File(hdf_file, 'r') as f:
        for (path, dset) in h5py_dataset_iterator(f):
            print(path, dset)

    return None

# Pass in the path
traverse_datasets('datasets/train_catvnoncat.h5')
Copy the code

The output results are as follows:

> in this paper, using synchronous assistant] [article (https://juejin.cn/post/6940875049587097631)Copy the code