import torch from pathlib import Path model = torch.load('cloud_removal_model/cloud_removal_unet_best.pth', map_location='cpu') print(type(model)) print("hasattr inc:", hasattr(model, 'inc')) if hasattr(model, 'inc'): print("hasattr double_conv:", hasattr(model.inc, 'double_conv')) if hasattr(model.inc, 'double_conv'): print("in_channels:", model.inc.double_conv[0].in_channels) else: for name, param in model.named_parameters(): print(name, param.shape) break