Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implementation of training on the per atom target quantities #101

Closed
wants to merge 7 commits into from
Closed

implementation of training on the per atom target quantities #101

wants to merge 7 commits into from

Conversation

SanggyuChong
Copy link
Contributor

@SanggyuChong SanggyuChong commented Feb 21, 2024

Hello,

This PR is a first attempt at the implementation of training the models (SOAP-BPNN and alchemical) on the per atom targets for extensive quantities (e.g. energy) rather than the raw extensive values. Usefulness of this, apart from personal preferences in model training, is that it allows one to retain consistency between models in metatensor-models and default training behavior of MACE, NequIP, and other packages.

In the proposed solution, changes are summarized as follows:

  • peratom_targets, a list of strings that contain targets that should be trained on the per atom values, is defined and accepted as an input to comput_model_loss function of compute_loss.py. The list can be supplied in the input yaml file.
  • in the compute_model_loss function, model predictions and the target values are divided by the number of atoms before it is passed to loss then MSELoss.

I understand this may not be the most optimal solution to this. All suggestions are welcome in refactoring the feature.

Resolves #95


📚 Documentation preview 📚: https://metatensor-models--101.org.readthedocs.build/en/101/

@SanggyuChong
Copy link
Contributor Author

closing this PR as @frostedoyster and I have decided to modify a completely different part of the software stack.

@SanggyuChong
Copy link
Contributor Author

After another discussion, we decided to keep the original approach, which has been incorporated into a new PR under #105.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option for per atom RMSE in the loss
2 participants