Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Wang committed Feb 1, 2024
1 parent 600349b commit 9dd10c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/tests/pt/test_rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_rotation(self):
result1 = self.model(**get_data(self.origin_batch))
result2 = self.model(**get_data(self.rotated_batch))
rotation = torch.from_numpy(self.rotation).to(env.DEVICE)
self.assertAlmostEqual(result1["energy"], result2["energy"])
torch.testing.assert_close(result1["energy"], result2["energy"])
if "force" in result1:
torch.testing.assert_close(
result2["force"][0], torch.matmul(rotation, result1["force"][0].T).T
Expand Down

0 comments on commit 9dd10c9

Please sign in to comment.