Download debug_shapes.py from kabiriitb/rockglacierNET: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/kabiriitb/rockglacierNET/resolve/main/debug_shapes.py
- Command line
-
hf download hf://kabiriitb/rockglacierNET/debug_shapes.py
-
curl -L -o debug_shapes.py https://huggingface.co/kabiriitb/rockglacierNET/resolve/main/debug_shapes.py
461 Bytes
| import numpy as np | |
| from data_generator import RockGlacierDataGenerator | |
| import traceback | |
| gen = RockGlacierDataGenerator('datacollection/output/dataset/train/features', 'datacollection/output/dataset/train/masks', batch_size=8, target_size=(128, 128), augment=False) | |
| try: | |
| feature, mask = gen._load_pair(gen.feature_files[0], gen.mask_files[0]) | |
| print(f"File 0 feature shape: {feature.shape}, mask shape: {mask.shape}") | |
| except Exception as e: | |
| print(e) | |