評價此頁

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,則對非確定性操作報錯。