Skip to content

Commit

Permalink
fix: precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Apr 7, 2024
1 parent 1b233e7 commit 97bb808
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/tests/pt/model/test_linear_atomic_model_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def forward(
[4.0, 5.0, 6.0],
]
)
.view([nf, nloc] + self.output_def()["energy"].shape)
.view([nf, nloc, *self.output_def()["energy"].shape])
.to(env.GLOBAL_PT_FLOAT_PRECISION)
.to(env.DEVICE)
)
Expand Down Expand Up @@ -124,7 +124,7 @@ def forward(
[10.0, 11.0, 12.0],
]
)
.view([nf, nloc] + self.output_def()["energy"].shape)
.view([nf, nloc, *self.output_def()["energy"].shape])
.to(env.GLOBAL_PT_FLOAT_PRECISION)
.to(env.DEVICE)
)
Expand Down Expand Up @@ -206,8 +206,8 @@ def test_linear_atomic_model_stat_with_bias(self):
[4.0, 5.0, 6.0],
[7.0, 8.0, 9.0],
]
).reshape([nf, nloc] + linear_model.fitting_output_def()["energy"].shape)

).reshape(nf, nloc, *linear_model.fitting_output_def()["energy"].shape)
np.testing.assert_almost_equal(ret0, expected_ret0)

# 2. test bias is applied
Expand Down

0 comments on commit 97bb808

Please sign in to comment.