評價此頁

torch.cuda.set_rng_state#

torch.cuda.set_rng_state(new_state, device='cuda')[原始碼]#

設定指定 GPU 的隨機數生成器狀態。

引數
  • new_state (torch.ByteTensor) – 所需的狀態

  • device (torch.deviceint, 可選) – 用於設定 RNG 狀態的裝置。預設為 'cuda' (即 torch.device('cuda'),當前 CUDA 裝置)。