torch.set_deterministic_debug_mode¶ torch.set_deterministic_debug_mode(debug_mode)[source][source]¶ 设置确定性操作的调试模式。 注意 这是 torch.use_deterministic_algorithms() 的替代接口。有关受影响操作的详细信息,请参阅该函数的文档。 参数 debug_mode (str 或 int) – 如果为 “default” 或 0,则不对非确定性操作报错或警告。如果为 “warn” 或 1,则对非确定性操作发出警告。如果为 “error” 或 2,则对非确定性操作报错。