From 623ddc7edde7bb0695ca33c84d614516520a5225 Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:08:10 +0800 Subject: [PATCH] fix(dp): fix dp seed in dpa2 descriptor (#3957) ## Summary by CodeRabbit - **New Features** - Introduced a `seed` parameter to enhance the initialization process, enabling more controlled and reproducible results. --- deepmd/dpmodel/descriptor/dpa2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deepmd/dpmodel/descriptor/dpa2.py b/deepmd/dpmodel/descriptor/dpa2.py index d42a9da26e..86ed7ec40c 100644 --- a/deepmd/dpmodel/descriptor/dpa2.py +++ b/deepmd/dpmodel/descriptor/dpa2.py @@ -476,6 +476,7 @@ def init_subclass_params(sub_data, sub_class): self.repformers.dim_in, bias=False, precision=precision, + seed=child_seed(seed, 3), ) self.tebd_transform = None if self.add_tebd_to_repinit_out: @@ -484,6 +485,7 @@ def init_subclass_params(sub_data, sub_class): self.repformers.dim_in, bias=False, precision=precision, + seed=child_seed(seed, 4), ) assert self.repinit.rcut > self.repformers.rcut assert self.repinit.sel[0] > self.repformers.sel[0]