We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3676f4e commit 31f50edCopy full SHA for 31f50ed
efficientnet_pytorch/utils.py
@@ -314,5 +314,5 @@ def load_pretrained_weights(model, model_name, load_fc=True):
314
state_dict.pop('_fc.weight')
315
state_dict.pop('_fc.bias')
316
res = model.load_state_dict(state_dict, strict=False)
317
- assert str(res.missing_keys) == str(['_fc.weight', '_fc.bias']), 'issue loading pretrained weights'
+ assert set(res.missing_keys) == set(['_fc.weight', '_fc.bias']), 'issue loading pretrained weights'
318
print('Loaded pretrained weights for {}'.format(model_name))
0 commit comments