Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iProzd committed May 14, 2024
1 parent 29473c5 commit f3da347
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions deepmd/pt/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ def dict_to_device(sample_dict):

def get_generator(seed: Optional[int] = None) -> Optional[torch.Generator]:
if seed is not None:
generator = torch.Generator(device=DEVICE)
generator.manual_seed(seed)
return generator
return torch.manual_seed(seed)
else:
return None

0 comments on commit f3da347

Please sign in to comment.