import h5py with h5py.File('generative_model.weights.h5', 'r') as f: def print_structure(name, obj): if isinstance(obj, h5py.Dataset): print(f"{name}: {obj.shape} dtype={obj.dtype}") f.visititems(print_structure)