Skip to content

Commit

Permalink
Update code comment in 04-01
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusOrsoe committed Sep 23, 2023
1 parent 999e26d commit 03dc5d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/04_training/01_train_dynedge.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@ def main(
# Save results as .csv
results.to_csv(f"{path}/results.csv")

# Save full model (including weights) to .pth file - Not version proof
# Save full model (including weights) to .pth file - not version safe
# Note: Models saved as .pth files in one version of graphnet
# may not be compatible with a different version of graphnet.
model.save(f"{path}/model.pth")

# Save model config and state dict - Version safe save method.
# This method of saving models is the safest way.
model.save_state_dict(f"{path}/state_dict.pth")
model.save_config(f"{path}/model_config.yml")

Expand Down

0 comments on commit 03dc5d2

Please sign in to comment.