Spaces:
Sleeping
Sleeping
Download inspect_weights.py from ArushBuilds/Pragya: direct link, hf CLI and curl.
- Browser
- Download file 249 Bytes
-
https://huggingface.co/spaces/ArushBuilds/Pragya/resolve/2f5d2dceb9fe8d9b6a898c273e6c62508ba3b233/inspect_weights.py
- Command line
-
hf download hf://spaces/ArushBuilds/Pragya@2f5d2dceb9fe8d9b6a898c273e6c62508ba3b233/inspect_weights.py
-
curl -L -o inspect_weights.py https://huggingface.co/spaces/ArushBuilds/Pragya/resolve/2f5d2dceb9fe8d9b6a898c273e6c62508ba3b233/inspect_weights.py
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) | |