From e9bfabe4340f205487ff486de6fb31d5441106b7 Mon Sep 17 00:00:00 2001 From: MengzhangLI <mcmong@pku.edu.cn> Date: Fri, 29 Apr 2022 16:41:32 +0800 Subject: [PATCH] [Doc] Add more clearly statement of CPU training/inference (#1518) * [Doc] Add more clearly statement of CPU training/inference * Update docs/en/inference.md Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> --- docs/en/inference.md | 3 ++- docs/en/train.md | 2 +- docs/zh_cn/inference.md | 5 +++-- docs/zh_cn/train.md | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/en/inference.md b/docs/en/inference.md index cd6eaf0c..1fc94ef9 100644 --- a/docs/en/inference.md +++ b/docs/en/inference.md @@ -16,7 +16,8 @@ You can use the following commands to test a dataset. # single-gpu testing python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] [--show] -# CPU: disable GPUs and run single-gpu testing script +# CPU: If GPU unavailable, directly running single-gpu testing command above +# CPU: If GPU available, disable GPUs and run single-gpu testing script export CUDA_VISIBLE_DEVICES=-1 python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] [--show] diff --git a/docs/en/train.md b/docs/en/train.md index 8c47121c..7c1c4118 100644 --- a/docs/en/train.md +++ b/docs/en/train.md @@ -37,7 +37,7 @@ If you want to specify the working directory in the command, you can add an argu #### Train with CPU -The process of training on the CPU is consistent with single GPU training. We just need to disable GPUs before the training process. +The process of training on the CPU is consistent with single GPU training if machine does not have GPU. If it has GPUs but not wanting to use it, we just need to disable GPUs before the training process. ```shell export CUDA_VISIBLE_DEVICES=-1 diff --git a/docs/zh_cn/inference.md b/docs/zh_cn/inference.md index b681dca2..835872be 100644 --- a/docs/zh_cn/inference.md +++ b/docs/zh_cn/inference.md @@ -15,8 +15,9 @@ # å•å¡ GPU 测试 python tools/test.py ${é…置文件} ${检查点文件} [--out ${结果文件}] [--eval ${è¯„ä¼°æŒ‡æ ‡}] [--show] -# CPU: ç¦ç”¨ GPU 并è¿è¡Œå• GPU 测试脚本 -export CUDA_VISIBLE_DEVICES=-1 +# CPU: 如果机器没有 GPU, 则跟上述å•å¡ GPU 测试一致 +# CPU: 如果机器有 GPU, 那么先ç¦ç”¨ GPU å†è¿è¡Œå• GPU 测试脚本 +export CUDA_VISIBLE_DEVICES=-1 # ç¦ç”¨ GPU python tools/test.py ${é…置文件} ${检查点文件} [--out ${结果文件}] [--eval ${è¯„ä¼°æŒ‡æ ‡}] [--show] # 多å¡GPU 测试 diff --git a/docs/zh_cn/train.md b/docs/zh_cn/train.md index 8e200b17..a54f28f0 100644 --- a/docs/zh_cn/train.md +++ b/docs/zh_cn/train.md @@ -27,7 +27,7 @@ python tools/train.py ${CONFIG_FILE} [å¯é€‰å‚æ•°] #### 使用 CPU è®ç»ƒ -使用 CPU è®ç»ƒçš„æµç¨‹å’Œä½¿ç”¨å• GPU è®ç»ƒçš„æµç¨‹ä¸€è‡´ï¼Œæˆ‘们仅需è¦åœ¨è®ç»ƒæµç¨‹å¼€å§‹å‰ç¦ç”¨ GPU。 +如果计算机没有 GPU,那么使用 CPU è®ç»ƒçš„æµç¨‹å’Œä½¿ç”¨å• GPU è®ç»ƒçš„æµç¨‹ä¸€è‡´ã€‚如果计算机有 GPU 但是想使用 CPU,我们仅需è¦åœ¨è®ç»ƒæµç¨‹å¼€å§‹å‰ç¦ç”¨ GPU。 ```shell export CUDA_VISIBLE_DEVICES=-1 -- GitLab