評價此頁

torch.xpu.set_rng_state#

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

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

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

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