Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument to turn off strict model state dict loading checks #148

Open
MaxFBurg opened this issue Mar 8, 2024 · 0 comments
Open

Argument to turn off strict model state dict loading checks #148

MaxFBurg opened this issue Mar 8, 2024 · 0 comments

Comments

@MaxFBurg
Copy link
Member

MaxFBurg commented Mar 8, 2024

If one wants to load a pre-trained model and change some model config parameter, e.g. pre-trained with shifter, but then do experiments with shifter=False, this can be obtained by setting transfer=True in the model config. However, then model initialization fails, because trasfer usually is not an argument for our models. Could we refactor this to allow for model loading in a more flexible way? E.g. by adding another parameter to load_model that allows for turning off these checks, without having to modify the model_config?

match_names=model_config.get("transfer", False),
ignore_unused=model_config.get("transfer", False),
ignore_dim_mismatch=model_config.get("transfer", False),
ignore_missing=model_config.get("transfer", False),

Might be related to #147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant