Skip to content

Commit

Permalink
use torch.linalg.cross to silence UserWarning about missing dim kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Feb 29, 2024
1 parent 9f6dd8c commit fc77430
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chgnet/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,9 @@ def from_graphs(
else:
strain = None
lattice = graph.lattice
volumes.append(torch.dot(lattice[0], torch.cross(lattice[1], lattice[2])))
volumes.append(
torch.dot(lattice[0], torch.linalg.cross(lattice[1], lattice[2]))
)
strains.append(strain)

# Bonds
Expand Down

0 comments on commit fc77430

Please sign in to comment.