Complete medical imaging workspace dump (weights, deliverables, papers, notebooks, code, figures)
eded815 verified Download check_ckpt.py from unknownBrain/BioHCL-SSSM-Complete-Workspace: direct link, hf CLI and curl.
- Browser
- Download file 869 Bytes
-
https://huggingface.co/unknownBrain/BioHCL-SSSM-Complete-Workspace/resolve/main/check_ckpt.py
- Command line
-
hf download hf://unknownBrain/BioHCL-SSSM-Complete-Workspace/check_ckpt.py
-
curl -L -o check_ckpt.py https://huggingface.co/unknownBrain/BioHCL-SSSM-Complete-Workspace/resolve/main/check_ckpt.py
869 Bytes
| import torch | |
| import os | |
| path = r"C:\Users\Acer\Documents\myproject\medical imaging\medical imaging\best_student_cv.pt" | |
| print(f"File size: {os.path.getsize(path) / (1024*1024):.2f} MB") | |
| try: | |
| ckpt = torch.load(path, map_location='cpu') | |
| if isinstance(ckpt, dict): | |
| print("Checkpoint is dict with keys:", list(ckpt.keys())[:10]) | |
| if 'model_state_dict' in ckpt: | |
| print("Found model_state_dict with layers:", len(ckpt['model_state_dict'])) | |
| elif 'state_dict' in ckpt: | |
| print("Found state_dict with layers:", len(ckpt['state_dict'])) | |
| else: | |
| print("Direct state_dict keys count:", len(ckpt)) | |
| first_keys = list(ckpt.keys())[:5] | |
| print("Sample keys:", first_keys) | |
| else: | |
| print("Checkpoint type:", type(ckpt)) | |
| except Exception as e: | |
| print("Error loading checkpoint:", e) | |