Skip to content

How to load a pre-trained model #499

Answered by MarcD3
ccccyf asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

There are two things to note:

First, when using a model checkpoint to train from, you still need the training module to be instantiated similarly as to a fresh training run, using something of the form:

training_module:
  _target_: nequip.train.EMALightningModule
  And specify the rest of the training settings how you wish to for this run

Second, to use a model checkpoint for the model instantiation, instead of the model section of the training module being the setup of a nequip or allegro model, it is structured like your code snippet, just change the syntax of ModelFromCheckpoint to nequip.model.ModelFromCheckpoint

The model section within the training module should look like this:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ccccyf
Comment options

Answer selected by cw-tan
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