捷徑

torch.cuda.set_rng_state

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

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

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

  • device (torch.deviceint, optional) – 要設定 RNG 狀態的裝置。預設值:'cuda' (即 torch.device('cuda'),目前的 CUDA 裝置)。

文件

存取 PyTorch 的全面開發者文件

檢視文件

教學

取得初學者和進階開發者的深入教學

檢視教學

資源

尋找開發資源並獲得問題解答

檢視資源