Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 8, 2024
1 parent 78e9ff8 commit 9f3f3c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apax/nn/torch/model/gmnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ def forward(
requires_grad.append(eps)
else:
perturbation = None

energy = self.energy_model(R, Z, neighbor, box, offsets, perturbation)


grads = autograd.grad(energy, requires_grad,
grad_outputs=torch.ones_like(energy),
create_graph=True)

neg_forces = grads[0]
forces = -neg_forces

Expand Down

0 comments on commit 9f3f3c0

Please sign in to comment.