torch.set_rng_state

torch.set_rng_state(new_state)[源代码]

设定随机数生成器的状态。

注意

此函数仅适用于CPU。对于CUDA,请使用torch.manual_seed(),因为它同时支持CPU和CUDA。

参数

new_state (torch.ByteTensor) – 指定的状态

本页目录