Closed MSJavaScript closed 2 months ago
ps: I want to train the model on multi-core CPU or a single GPU
Hi -
Adding and using your own model is as simple as adding it here - https://github.com/FAIR-Chem/fairchem/tree/main/src/fairchem/core/models and ensuring it's added to the registry by including the following - https://github.com/FAIR-Chem/fairchem/blob/main/src/fairchem/core/models/schnet.py#L19.
As far as loss function, if you are using a built-in pytorch loss function you just need to specify it in the config - https://github.com/FAIR-Chem/fairchem/blob/657598b4ed301b589601016397e8f4012db7d3dd/configs/ocp_example.yml#L137. Otherwise you'll need to manually add it here - https://github.com/FAIR-Chem/fairchem/blob/657598b4ed301b589601016397e8f4012db7d3dd/src/fairchem/core/trainers/base_trainer.py#L526-L545
I want to add my own nn-model to the fairchem, with my own collate function and loss function, how can I do that ?