You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
Describe the bug
We cannot load a Prediction Head with class weights.
Error message
RuntimeError: Error(s) in loading state_dict for TextClassificationHead:
Unexpected key(s) in state_dict: "loss_fct.weight".
I suspect this bug was introduced by updating to pytorch version 1.5.0.
Unfortunately we do not have tests covering this use case, so we cannot pin the cause exactly.