Skip to content

ENH: Add workflow to train model #20

Merged
merged 5 commits into from
Sep 25, 2023
Merged

ENH: Add workflow to train model #20

merged 5 commits into from
Sep 25, 2023

Conversation

deshmukg
Copy link
Contributor

@deshmukg deshmukg commented Sep 25, 2023

  • Closes Create training and prediction workflows #11.
  • Added train.py that contains Standardizer to standardize the outputs, Model class to initialize a model and train/validate/predict.
  • Added partition_structure_by_layer to partition structures based on layer number rather than z-coordinate. This works better than partition_structure since different alloys have different lattice constants and hence, different slab heights. Therefore, the latter leads to incorrect graphs if different alloys are present in the dataset. All the key classes and functions now use partition_structure_by_layer by default. The interlayer spacing is calculated by sorting the list of unique z-coordinates of a slab in ascending order and taking the difference of the first two elements. This is essentially the calculation of the interlayer spacing of the bottom two layers. This method works if the bottom few layers are constrained in a calculation.
  • Converted lists to store layers in MultiGCN to nn.ModuleList objects. This is required to run the model on a GPU, since Python lists cannot be transferred to a GPU.
  • Added Deal with __init__.py when making package #21.

@deshmukg deshmukg marked this pull request as ready for review September 25, 2023 21:01
@deshmukg deshmukg merged commit b86dcea into master Sep 25, 2023
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create training and prediction workflows
1 participant