Skip to content

Get and run submodule from a deployed model #308

Answered by Linux-cpp-lisp
Hongyu-yu asked this question in Q&A
Discussion options

You must be logged in to vote

Hm GradientOutput has a skip flag (https://github.com/mir-group/nequip/blob/main/nequip/nn/_grad_output.py#L26) for exactly this purpose, but StressForceOutput is missing one.

Probably the easiest thing to do is to save the state_dict() of the deployed model (which should have correct key names still, I think?) and then create a new model without the StressForceOutput model builder , and then use load_model_state builder to load the weights from the deployed model. You can deploy this YAML directly with nequip-deploy build --model

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Hongyu-yu
Comment options

Answer selected by Hongyu-yu
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