评价此页

torch.cuda.seed_all#

torch.cuda.seed_all()[source]#

将所有 GPU 随机数生成的种子设置为一个随机数。

如果 CUDA 不可用,调用此函数是安全的;在这种情况下,它将被静默忽略。