From d1d59bb7f982172df3e418349fc3c168cb507abf Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 22 Nov 2024 14:37:19 -0500 Subject: [PATCH] fix(pt): use eval mode in the Python interface Same as #4402 Signed-off-by: Jinzhe Zeng --- deepmd/pt/infer/deep_eval.py | 1 + 1 file changed, 1 insertion(+) diff --git a/deepmd/pt/infer/deep_eval.py b/deepmd/pt/infer/deep_eval.py index 89bb8a0286..59b833d34c 100644 --- a/deepmd/pt/infer/deep_eval.py +++ b/deepmd/pt/infer/deep_eval.py @@ -143,6 +143,7 @@ def __init__( self.model_def_script = {} else: raise ValueError("Unknown model file format!") + self.dp.eval() self.rcut = self.dp.model["Default"].get_rcut() self.type_map = self.dp.model["Default"].get_type_map() if isinstance(auto_batch_size, bool):