-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
ML_Decoder/src_files/models/utils/factory.py
Lines 47 to 56 in 8a9e984
| if not load_head: | |
| if 'model' in state: | |
| key = 'model' | |
| else: | |
| key = 'state_dict' | |
| filtered_dict = {k: v for k, v in state[key].items() if | |
| (k in model.state_dict() and 'head.fc' not in k)} | |
| model.load_state_dict(filtered_dict, strict=False) | |
| else: | |
| model.load_state_dict(state[key], strict=True) |
when load_head is True, it didn't defined key.
+ i know solution. so, i just notified this problem. plz fix it
Metadata
Metadata
Assignees
Labels
No labels