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

[Feature] Transfer Learning #167

Open
icedoom888 opened this issue Nov 26, 2024 · 2 comments · May be fixed by #166
Open

[Feature] Transfer Learning #167

icedoom888 opened this issue Nov 26, 2024 · 2 comments · May be fixed by #166
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@icedoom888
Copy link

Is your feature request related to a problem? Please describe.

Implementation of the a Transfer Learning feature: initialise the model state from a previous experiment.

Necessary to reproduce: Regional data-driven weather modeling with a global stretched-grid

transfer

Describe the solution you'd like

  • Sanify checkpoint when size missmatch: remove all tensors that do not fit.
  • Save as new checkpoint suited for Loading.
  • Load the new checkpoint with strict=False,
  • Start a new training run.

Describe alternatives you've considered

No response

Additional context

No response

Organisation

MeteoSwiss

@icedoom888 icedoom888 added the enhancement New feature or request label Nov 26, 2024
@icedoom888 icedoom888 changed the title Transfer Learning [Feature] Transfer Learning Nov 26, 2024
@icedoom888 icedoom888 linked a pull request Nov 26, 2024 that will close this issue
@gabrieloks
Copy link
Contributor

Hello @icedoom888. Thanks a lot for opening this issue. We have already started working on the first phase of transfer learning (going from stage A to stage B in your figure) in this PR #140 . I have some questions about the solution:

-When there are size mismatches, do we really need to remove these tensors? We could just skip loading them and have the model initialise them at their default value.

-Do we need to save the sanified checkpoint and load it again? Could we just load the checkpoint from the previous stage and avoid loading certain layers with a filter?

Happy to have a chat with you if needed.

Gabriel

@icedoom888
Copy link
Author

Hey @gabrieloks!
I was able to run all stages with my implementation, will just need to polish it up a bit ;)

Regarding your questions: I am addressing this issue right now, will try to load the model directly without storing the transfer.ckpt file.
I will update you as soon as i test the new feature :)

@icedoom888 icedoom888 self-assigned this Dec 2, 2024
@icedoom888 icedoom888 added the help wanted Extra attention is needed label Dec 2, 2024
@icedoom888 icedoom888 linked a pull request Dec 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants