From 72e4b6b0f1286e148454f89bda81ac9cace8d32e Mon Sep 17 00:00:00 2001 From: shenyan <23357320@qq.com> Date: Fri, 22 Oct 2021 10:26:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AEworkers=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E4=B8=BA8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 9ba1bf0..81bdc16 100644 --- a/main.py +++ b/main.py @@ -57,7 +57,7 @@ def main(stage, gpus = 1 if torch.cuda.is_available() and gpus is None and tpu_cores is None else None # 定义不常改动的通用参数 # TODO 获得最优的batch size - num_workers = cpu_count() + num_workers = min([cpu_count(), 8]) # 获得非通用参数 config = {'dim_in': 32, } for kth_fold in range(kth_fold_start, k_fold):