Skip to content

Can I create *. model file from checkpoint file? #564

Answered by ilyes319
turbosonics asked this question in Q&A
Discussion options

You must be logged in to vote

There is no direct wait to do that yet, but the easiest is the following:

  • First run a short job, to create a temple *.model that has the same hypers as the final mode.
  • Then use a following script:
ckpt = torch.load(path_ckpt)
model = torch.load(path_model)
model.load_state_dict(ckpt["model"])
torch.save(model, path_new_model)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ilyes319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants