torch.set_rng_state#
- torch.set_rng_state(new_state)[原始碼]#
設定隨機數生成器狀態。
注意
此函式僅適用於 CPU。對於 CUDA,請使用
torch.manual_seed(),它同時適用於 CPU 和 CUDA。- 引數
new_state (torch.ByteTensor) – 所需的狀態
設定隨機數生成器狀態。
注意
此函式僅適用於 CPU。對於 CUDA,請使用 torch.manual_seed(),它同時適用於 CPU 和 CUDA。
new_state (torch.ByteTensor) – 所需的狀態