Skip to content

Commit

Permalink
fix: dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Mar 26, 2024
1 parent 858eed4 commit daa73b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd/pt/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def dict_to_device(sample_dict):
sample_dict[key] = [item.to(DEVICE) for item in sample_dict[key]]
if isinstance(sample_dict[key], np.float32):
sample_dict[key] = (
torch.ones(1, dtype=torch.float64, device=DEVICE) * sample_dict[key]
torch.ones(1, dtype=torch.float32, device=DEVICE) * sample_dict[key]
)
else:
if sample_dict[key] is not None:
Expand Down

0 comments on commit daa73b9

Please sign in to comment.