是否torch.manual_seed包括 的操作torch.cuda.manual_seed_all?
torch.manual_seed
torch.cuda.manual_seed_all
如果是的话,我们可以直接使用torch.manual_seed来设置种子。否则我们应该调用这两个函数。
python random random-seed pytorch
python ×1
pytorch ×1
random ×1
random-seed ×1