From 9d7fea7cdf12181073d8a4e0293c08abacd130ef Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 5 Mar 2024 22:52:57 -0500 Subject: [PATCH] fix typo --- deepmd/pt/loss/tensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepmd/pt/loss/tensor.py b/deepmd/pt/loss/tensor.py index e0cf229e74..ca3ef3b3ed 100644 --- a/deepmd/pt/loss/tensor.py +++ b/deepmd/pt/loss/tensor.py @@ -83,7 +83,7 @@ def forward(self, model_pred, label, natoms, learning_rate=0.0, mae=False): Other losses for display. """ del learning_rate, mae - loss = torch.tensor.zeros( + loss = torch.zeros( 1, dtype=env.GLOBAL_PT_FLOAT_PRECISION, device=env.DEVICE )[0] more_loss = {}