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
I train a SigLIP model without problem, but when I load the training checkpoint to evaluate on the downstream task, I get error: RuntimeError: Error(s) in loading state_dict for CLIP: Unexpected key(s) in state_dict: "logit_bias".
on incompatible_keys = model.load_state_dict(state_dict, strict=strict)
state_dict from checkpoint has the key "logit_bias", but model does not.
I can assign a value to init_logit_bias, passing to create_model_and_transforms() during evaluation, to make the model.state_dict() notice the key logit_bias. But is there a more elegant way to do so, which I do not need specify a model when create it and pass a specific variable to it but I can load the necessary keys based on the checkpoint? (I tried model.load_state_dict(state_dict, strict=**False**), but it did not load the correct value from the checkpoint. Also, I am not sure if it is secure/reliable enough to change the strict to False. )
The text was updated successfully, but these errors were encountered:
I train a SigLIP model without problem, but when I load the training checkpoint to evaluate on the downstream task, I get error:
RuntimeError: Error(s) in loading state_dict for CLIP: Unexpected key(s) in state_dict: "logit_bias".
on
incompatible_keys = model.load_state_dict(state_dict, strict=strict)
state_dict from checkpoint has the key "logit_bias", but model does not.
I can assign a value to
init_logit_bias
, passing tocreate_model_and_transforms()
during evaluation, to make themodel.state_dict()
notice the keylogit_bias
. But is there a more elegant way to do so, which I do not need specify a model when create it and pass a specific variable to it but I can load the necessary keys based on the checkpoint? (I triedmodel.load_state_dict(state_dict, strict=**False**)
, but it did not load the correct value from the checkpoint. Also, I am not sure if it is secure/reliable enough to change the strict to False. )The text was updated successfully, but these errors were encountered: