Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 12, 2024
1 parent cf21925 commit 1bbaf66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions deepmd/dpmodel/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def _compute_weight(
nlists_: List[np.ndarray],
) -> np.ndarray:
"""This should be a list of user defined weights that matches the number of models to be combined."""
nmodels= len(self.models)
return [np.ones(1)/nmodels for _ in range(nmodels)]
nmodels = len(self.models)
return [np.ones(1) / nmodels for _ in range(nmodels)]

def get_dim_fparam(self) -> int:
"""Get the number (dimension) of frame parameters of this atomic model."""
Expand Down
5 changes: 2 additions & 3 deletions deepmd/pt/model/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,8 @@ def _compute_weight(
self, extended_coord, extended_atype, nlists_
) -> List[torch.Tensor]:
"""This should be a list of user defined weights that matches the number of models to be combined."""

nmodels= len(self.models)
return [torch.ones(1)/nmodels for _ in range(nmodels)]
nmodels = len(self.models)
return [torch.ones(1) / nmodels for _ in range(nmodels)]

def get_dim_fparam(self) -> int:
"""Get the number (dimension) of frame parameters of this atomic model."""
Expand Down

0 comments on commit 1bbaf66

Please sign in to comment.