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/067c53c6c29fd4381fdca510a91dbbbe39bc9aa0/inspect_weights.py
- Command line
-
hf download hf://spaces/ArushBuilds/Pragya@067c53c6c29fd4381fdca510a91dbbbe39bc9aa0/inspect_weights.py
-
curl -L -o inspect_weights.py https://huggingface.co/spaces/ArushBuilds/Pragya/resolve/067c53c6c29fd4381fdca510a91dbbbe39bc9aa0/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) | |