Support pre-training or model resuming when loading a checkpoint
We should support two behaviors when loading a checkpoint:
-
--train.resumeoption (currently available) to continue training. -
--train.pretrainoption to only load the weights (see this script)- reset the callbacks (
EarlyStopping) - reset the optimizer
- reinitialize the last layer in case of a different alphabet
- reset the callbacks (
This will cover two uses cases:
-
--train.resumeto continue training on the same dataset -
--train.pretrainto load pretrained weights when fine-tuning on another dataset
Edited by Solene Tarride