Skip to content
Snippets Groups Projects
Unverified Commit 5c83a044 authored by Neta Zmora's avatar Neta Zmora Committed by GitHub
Browse files

Checkpoint loading: allow loading non-strict state-keys (#300)

* Checkpoint loading: allow loading non-strict state-keys

Change the default behavior of load_state_dict() so that the
keys in the loaded checkpoint do not need to match exactly the
keys in Distiller's model.

However, we placed some restriction on non-strict checkpoint loading: 
Even when loading checkpoints non-strict, we raise an exception if some keys
are missing (extra keys are accepted).
This is because the time-wasting potential of loading (and using) a model which only contains part of the state-keys (while the user expects it to contain all of a model's state-keys) is too large.
We want the user to be completely aware that not all of the state-keys are initialized from the loaded checkpoint.
parent 6cd22e7d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment