Skip to content

KeyError: 'Trying to restore training state but checkpoint contains only the model. This is probably due to ModelCheckpoint.save_weights_only being set to True.' #9745

Discussion options

You must be logged in to vote

if you set save_weights_only=True in ModelCheckpoint then it won't save optimizer/scheduler states in an ideal case. So assigning this checkpoint to resume training won't work because it needs to restore optimizer/scheduler state as well to actually resume it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by morestart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment