Veylon / inspect_weights.py
Arush kumar
Upload 14 files
54ad1e5
Raw
History Blame Contribute Delete
249 Bytes
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)