快捷方式

torch.cuda.set_rng_state

torch.cuda.set_rng_state(new_state, device='cuda')[source][source]

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

引數
  • new_state (torch.ByteTensor) – 期望的狀態

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

文件

查閱 PyTorch 全面的開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源