浏览代码

Set num threads to 1 in Torch (#4436)

/MLA-1734-demo-provider
GitHub 4 年前
当前提交
71d1ba68
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
      ml-agents/mlagents/torch_utils/torch.py

2
ml-agents/mlagents/torch_utils/torch.py


# Everywhere else is caught by the banned-modules setting for flake8
import torch # noqa I201
torch.set_num_threads(1)
# Known PyLint compatibility with PyTorch https://github.com/pytorch/pytorch/issues/701
# pylint: disable=E1101
if torch.cuda.is_available():

正在加载...
取消
保存