From 94c4a0335e8b52d79d9896d7ba195b3ea426ff55 Mon Sep 17 00:00:00 2001 From: Hoe Jiun Tian Date: Sat, 18 May 2024 09:25:24 +0800 Subject: [PATCH] Fix seeding in configs.py --- configs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs.py b/configs.py index 1808a84..de74fb7 100644 --- a/configs.py +++ b/configs.py @@ -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)