mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
[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>
This commit is contained in:
parent
f06c39f9d6
commit
e9bfabe434
@ -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]
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 测试
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user