Get and run submodule from a deployed model #308
-
Hello, I wonder if I can get and run submodule from a deployed model. To be more explicit, I have a model trained with I try to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hm Probably the easiest thing to do is to save the |
Beta Was this translation helpful? Give feedback.
Hm
GradientOutput
has askip
flag (https://github.com/mir-group/nequip/blob/main/nequip/nn/_grad_output.py#L26) for exactly this purpose, butStressForceOutput
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 theStressForceOutput
model builder , and then useload_model_state
builder to load the weights from the deployed model. You can deploy this YAML directly withnequip-deploy build --model