现在位置: 首页 > PyTorch 教程 > 正文

PyTorch torch.is_deterministic_algorithms_warn_only_enabled 函数


Pytorch torch 参考手册 Pytorch torch 参考手册

torch.is_deterministic_algorithms_warn_only_enabled 是 PyTorch 中用于检查确定性算法模式是否仅设置为警告的函数。

函数定义

torch.is_deterministic_algorithms_warn_only_enabled()

使用示例

实例

import torch

# 检查是否仅警告模式
is_warn_only = torch.is_deterministic_algorithms_warn_only_enabled()
print("是否仅警告模式:", is_warn_only)

Pytorch torch 参考手册 Pytorch torch 参考手册