Skip to content

Commit 31f50ed

Browse files
committed
updated assertion for missing keys
1 parent 3676f4e commit 31f50ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

efficientnet_pytorch/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,5 +314,5 @@ def load_pretrained_weights(model, model_name, load_fc=True):
314314
state_dict.pop('_fc.weight')
315315
state_dict.pop('_fc.bias')
316316
res = model.load_state_dict(state_dict, strict=False)
317-
assert str(res.missing_keys) == str(['_fc.weight', '_fc.bias']), 'issue loading pretrained weights'
317+
assert set(res.missing_keys) == set(['_fc.weight', '_fc.bias']), 'issue loading pretrained weights'
318318
print('Loaded pretrained weights for {}'.format(model_name))

0 commit comments

Comments
 (0)