-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from ipcamit/kliff-master-v1-kim
KIM Trainer and tests
- Loading branch information
Showing
12 changed files
with
512 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .base_trainer import Trainer | ||
from .kim_trainer import KIMTrainer | ||
from .lightning_trainer import GNNLightningTrainer | ||
|
||
# from .kim_trainer import KIMTrainer | ||
# from .torch_trainer import DNNTrainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import numpy as np | ||
|
||
|
||
def MSE_loss( | ||
predictions: np.ndarray, | ||
targets: np.ndarray, | ||
) -> np.ndarray: | ||
r""" | ||
Compute the mean squared error (MSE) of the residuals. | ||
Args: | ||
Returns: | ||
The MSE of the residuals. | ||
""" | ||
residuals = predictions - targets | ||
return np.mean(residuals**2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.