From 724f02959191752e2d11dbc4fd92f0de5b4b69ba Mon Sep 17 00:00:00 2001 From: zhiyang7 Date: Mon, 27 Dec 2021 14:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- douzero/evaluation/deep_agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/douzero/evaluation/deep_agent.py b/douzero/evaluation/deep_agent.py index f328f4f..df1fb4a 100644 --- a/douzero/evaluation/deep_agent.py +++ b/douzero/evaluation/deep_agent.py @@ -62,9 +62,9 @@ class DeepAgent: def act(self, infoset, with_confidence = False): if self.use_onnx and self.onnx_model is None: if torch.cuda.is_available(): - self.onnx_model = onnxruntime.InferenceSession(get_example(self.onnx_model_path), providers=['CPUExecutionProvider']) - else: self.onnx_model = onnxruntime.InferenceSession(get_example(self.onnx_model_path), providers=['CUDAExecutionProvider']) + else: + self.onnx_model = onnxruntime.InferenceSession(get_example(self.onnx_model_path), providers=['CPUExecutionProvider']) if not with_confidence and len(infoset.legal_actions) == 1: return infoset.legal_actions[0]