Skip to content

Commit b26b8e0

Browse files
[Doc] Add more clearly statement of CPU training/inference (open-mmlab#1518)
* [Doc] Add more clearly statement of CPU training/inference * Update docs/en/inference.md Co-authored-by: Miao Zheng <[email protected]>
1 parent 44b9c6f commit b26b8e0

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

docs/en/inference.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ You can use the following commands to test a dataset.
1616
# single-gpu testing
1717
python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] [--show]
1818

19-
# CPU: disable GPUs and run single-gpu testing script
19+
# CPU: If GPU unavailable, directly running single-gpu testing command above
20+
# CPU: If GPU available, disable GPUs and run single-gpu testing script
2021
export CUDA_VISIBLE_DEVICES=-1
2122
python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] [--show]
2223

docs/en/train.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ If you want to specify the working directory in the command, you can add an argu
3737

3838
#### Train with CPU
3939

40-
The process of training on the CPU is consistent with single GPU training. We just need to disable GPUs before the training process.
40+
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.
4141

4242
```shell
4343
export CUDA_VISIBLE_DEVICES=-1

docs/zh_cn/inference.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
# 单卡 GPU 测试
1616
python tools/test.py ${配置文件} ${检查点文件} [--out ${结果文件}] [--eval ${评估指标}] [--show]
1717

18-
# CPU: 禁用 GPU 并运行单 GPU 测试脚本
19-
export CUDA_VISIBLE_DEVICES=-1
18+
# CPU: 如果机器没有 GPU, 则跟上述单卡 GPU 测试一致
19+
# CPU: 如果机器有 GPU, 那么先禁用 GPU 再运行单 GPU 测试脚本
20+
export CUDA_VISIBLE_DEVICES=-1 # 禁用 GPU
2021
python tools/test.py ${配置文件} ${检查点文件} [--out ${结果文件}] [--eval ${评估指标}] [--show]
2122

2223
# 多卡GPU 测试

docs/zh_cn/train.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ python tools/train.py ${CONFIG_FILE} [可选参数]
2727

2828
#### 使用 CPU 训练
2929

30-
使用 CPU 训练的流程和使用单 GPU 训练的流程一致,我们仅需要在训练流程开始前禁用 GPU。
30+
如果计算机没有 GPU,那么使用 CPU 训练的流程和使用单 GPU 训练的流程一致。如果计算机有 GPU 但是想使用 CPU,我们仅需要在训练流程开始前禁用 GPU。
3131

3232
```shell
3333
export CUDA_VISIBLE_DEVICES=-1

0 commit comments

Comments
 (0)