File size: 249 Bytes
54ad1e5
 
 
 
 
 
 
1
2
3
4
5
6
7
8
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)