Skip to content

Commit

Permalink
fix: add dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Mar 13, 2024
1 parent eacd49c commit 0592107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd/pt/model/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def _compute_weight(
) -> 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)]
return [torch.ones(1, dtype=torch.float64, device=env.DEVICE) / 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 0592107

Please sign in to comment.