From 8c8553f679a4941f5a9a879cac48fe701eeaf89e Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 21 Sep 2024 00:15:05 -0400 Subject: [PATCH] long -> int32 Co-authored-by: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com> Signed-off-by: Jinzhe Zeng --- source/tests/pt/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tests/pt/common.py b/source/tests/pt/common.py index 7719f79353..16b343be8a 100644 --- a/source/tests/pt/common.py +++ b/source/tests/pt/common.py @@ -72,7 +72,7 @@ def eval_model( if spins is not None: assert isinstance(spins, torch.Tensor), err_msg assert isinstance(atom_types, torch.Tensor) or isinstance(atom_types, list) - atom_types = torch.tensor(atom_types, dtype=torch.long, device=DEVICE) + atom_types = torch.tensor(atom_types, dtype=torch.int32, device=DEVICE) elif isinstance(coords, np.ndarray): if cells is not None: assert isinstance(cells, np.ndarray), err_msg