Skip to content

Commit

Permalink
fix(dp): fix dp seed in dpa2 descriptor (deepmodeling#3957)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a `seed` parameter to enhance the initialization process,
enabling more controlled and reproducible results.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
iProzd authored and mtaillefumier committed Sep 18, 2024
1 parent 1e9360d commit 17975c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deepmd/dpmodel/descriptor/dpa2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]
Expand Down

0 comments on commit 17975c1

Please sign in to comment.