Closed zhanqiuzhang closed 3 years ago
The type of device is either torch.device("cuda") or torch.device("cpu"). Thus, device == 'cuda' will always be False and torch.cuda.manual_seed(params['seed']) will not work.
device
torch.device("cuda")
torch.device("cpu")
device == 'cuda'
False
torch.cuda.manual_seed(params['seed'])
Thank you very much for noticing, I should have fixed it now. Fortunately, we did not use manual seeds in our experiments.
The type of
device
is eithertorch.device("cuda")
ortorch.device("cpu")
. Thus,device == 'cuda'
will always beFalse
andtorch.cuda.manual_seed(params['seed'])
will not work.