Spaces:
Sleeping
Sleeping
| import torch | |
| # Load the state dictionary from the .pth file | |
| model_path = './checkpoints/artgan_pix2pix/latest_net_G.pth' | |
| state_dict = torch.load(model_path, map_location=torch.device('cpu')) | |
| # Print statistics about the weights | |
| for name, param in state_dict.items(): | |
| print(f"Layer: {name}") | |
| print(f"\tShape: {param.shape}") | |
| print(f"\tMean: {param.mean().item()}") | |
| print(f"\tStandard Deviation: {param.std().item()}") | |
| print(f"\tMin: {param.min().item()}") | |
| print(f"\tMax: {param.max().item()}") | |