I want to generate a unique random integer for the variable SEED. This code is part of a bigger script that is going to run multiple times and output each time, so feeding SEED with a non-duplicate random integer is important. Also, I tried random.sample
and such that return lists/sequence not an integer, but this is not the case here because of the following line using torch.
SEED = random.randint(1, 1000)
random.seed(SEED)
np.random.seed(SEED)
torch.manual_seed(SEED)
torch.cuda.manual_seed(SEED)
torch.backends.cudnn.deterministic = True