| import torch |
| from pathlib import Path |
|
|
| |
| dir_path = Path("AVE_Dataset/test/video") |
|
|
| |
| for file_path in sorted(dir_path.glob("*.pth")): |
| data = torch.load(file_path, map_location="cpu") |
| if len(data['timing_plan']) > 1: |
| pass |
| print(f"Loaded {file_path}, keys: {list(data.keys())}") |
|
|
| file_path = "AVE_Dataset/train/video/0vWh6Knoer8.pth" |
| |
| data = torch.load(file_path, map_location="cpu") |
|
|
| print(type(data)) |
| |
| if isinstance(data, torch.Tensor): |
| print(data.shape) |
| print(data) |
| |
| elif isinstance(data, dict): |
| for k, v in data.items(): |
| print(f"{k}: {type(v)}, shape={getattr(v, 'shape', None)}") |
| |
| elif isinstance(data, list): |
| print(f"List length: {len(data)}") |
| for i, item in enumerate(data[:3]): |
| print(f"[{i}] {type(item)}, shape={getattr(item, 'shape', None)}") |
| |
|
|