Alibaba-MIIL / PartialLabelingCSL

Official implementation for the paper: "Multi-label Classification with Partial Annotations using Class-aware Selective Loss"
MIT License
129 stars 18 forks source link

Issue while loading TResNet-M model #9

Open DMatHome opened 2 years ago

DMatHome commented 2 years ago

Hi,

I'm trying to load mtresnet_opim_86.72.pth and an error occurs while loading state_dict: model.load_state_dict(state['model'], strict=True) error: Exception has occurred: RuntimeError Error(s) in loading state_dict for TResNet: Missing key(s) in state_dict: "head.fc.weight", "head.fc.bias". Unexpected key(s) in state_dict: "head.fc.embedding_generator.0.weight", "head.fc.embedding_generator.0.bias", "head.fc.FC.weight", "head.fc.FC.bias".

If strict loading is disabled, then model is loaded without error, but classes are not found in the provided example image.

Does the model depend on exact PyTorch, CUDA versions? I`m running it on Windows: PyTorch: 1.10.2 CUDA: 11.3

Or I`m missing something else?