Skip to content

Commit

Permalink
bugfix PR#343 (#351)
Browse files Browse the repository at this point in the history
Co-authored-by: Abhishek Das <das.abhshk@gmail.com>
  • Loading branch information
mshuaibii and abhshkdz authored Jun 1, 2022
1 parent 5b6d0ac commit d376bcb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ocpmodels/trainers/forces_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,10 @@ def _compute_loss(self, out, batch_list):
[batch.fixed.to(self.device) for batch in batch_list]
)
mask = fixed == 0
if self.config["optim"]["loss_force"].startswith(
"atomwise"
if (
self.config["optim"]
.get("loss_force", "mae")
.startswith("atomwise")
):
force_mult = self.config["optim"].get(
"force_coefficient", 1
Expand Down

0 comments on commit d376bcb

Please sign in to comment.