torch.xpu.seed#
- torch.xpu.seed()[原始碼]#
將當前 GPU 隨機數生成的種子設定為一個隨機數。
If XPU is not available, calling this function is safe; it will be silently ignored.
警告
如果您正在處理多 GPU 模型,此函式將僅在一個 GPU 上初始化種子。要初始化所有 GPU,請使用
seed_all()。
將當前 GPU 隨機數生成的種子設定為一個隨機數。
If XPU is not available, calling this function is safe; it will be silently ignored.
警告
如果您正在處理多 GPU 模型,此函式將僅在一個 GPU 上初始化種子。要初始化所有 GPU,請使用 seed_all()。