Skip to content

Commit

Permalink
Fix seeding in configs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuntian authored May 18, 2024
1 parent eb1c07b commit 94c4a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ def dataloader(d, bs=256, shuffle=True, workers=-1, drop_last=True):


def seeding(seed):
seed = int(seed) # make sure seed in `int` type
if seed != -1:
seed = int(seed) # make sure seed in `int` type
torch.manual_seed(seed)
np.random.seed(seed)
random.seed(seed)
Expand Down

0 comments on commit 94c4a03

Please sign in to comment.