milesial / Pytorch-UNet

PyTorch implementation of the U-Net for image semantic segmentation with high quality images
GNU General Public License v3.0
9.3k stars 2.51k forks source link

A confusion in hubconf.py #494

Open coconut0713 opened 6 months ago

coconut0713 commented 6 months ago

state_dict = torch.hub.load_state_dict_from_url(checkpoint, progress=True) if 'mask_values' in state_dict: state_dict.pop('mask_values')
net.load_state_dict(state_dict)

Generally, ‘state_dict’ contains module names & parameters, but not mask values. What is the purpose of 'state_dict.pop('mask_values') '?