捷徑

torch.set_deterministic_debug_mode

torch.set_deterministic_debug_mode(debug_mode)[原始碼][原始碼]

設定決定性運算的偵錯模式。

注意

這是 torch.use_deterministic_algorithms() 的替代介面。有關受影響運算的詳細資訊,請參閱該函數的文件。

參數

debug_mode (strint) – 如果是「default」或 0,則在非決定性運算時不產生錯誤或警告。 如果是「warn」或 1,則在非決定性運算時發出警告。如果是「error」或 2,則在非決定性運算時產生錯誤。

文件

存取 PyTorch 的完整開發人員文件

檢視文件

教學課程

取得初學者和進階開發人員的深入教學課程

檢視教學課程

資源

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

檢視資源