快捷方式

torch.xpu.get_rng_state

torch.xpu.get_rng_state(device='xpu')[原始碼][原始碼]

返回指定 XPU 裝置的隨機數生成器狀態,格式為 ByteTensor。

引數

device (torch.deviceint, 可選) – 要返回 RNG 狀態的裝置。預設值:'xpu'(即 torch.device('xpu'),當前的 XPU 裝置)。

返回型別

Tensor

警告

此函式會立即初始化 XPU。

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深度教程

檢視教程

資源

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

檢視資源