Files
remote-sensing/.temp/test_checkpoint.py

8 lines
377 B
Python

import torch
checkpoint = torch.load('cloud_removal_model/cloud_removal_unet_best.pth', map_location='cpu')
print(checkpoint.keys())
print("in_channels in checkpoint:", 'in_channels' in checkpoint)
if 'in_channels' in checkpoint:
print(checkpoint['in_channels'])
print("Shape of inc.double_conv.0.weight:", checkpoint['model_state_dict']['inc.double_conv.0.weight'].shape)