You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/en/1_exist_data_model.md
+34-1
Original file line number
Diff line number
Diff line change
@@ -246,6 +246,7 @@ We provide testing scripts for evaluating an existing model on the whole dataset
246
246
The following testing environments are supported:
247
247
248
248
- single GPU
249
+
- CPU
249
250
- single node multiple GPUs
250
251
- multiple nodes
251
252
@@ -260,6 +261,15 @@ python tools/test.py \
260
261
[--eval ${EVAL_METRICS}] \
261
262
[--show]
262
263
264
+
# CPU: disable GPUs and run single-gpu testing script
265
+
export CUDA_VISIBLE_DEVICES=-1
266
+
python tools/test.py \
267
+
${CONFIG_FILE} \
268
+
${CHECKPOINT_FILE} \
269
+
[--out ${RESULT_FILE}] \
270
+
[--eval ${EVAL_METRICS}] \
271
+
[--show]
272
+
263
273
# multi-gpu testing
264
274
bash tools/dist_test.sh \
265
275
${CONFIG_FILE} \
@@ -398,6 +408,15 @@ python tools/test.py \
398
408
--options ${JSONFILE_PREFIX} \
399
409
[--show]
400
410
411
+
# CPU: disable GPUs and run single-gpu testing script
412
+
export CUDA_VISIBLE_DEVICES=-1
413
+
python tools/test.py \
414
+
${CONFIG_FILE} \
415
+
${CHECKPOINT_FILE} \
416
+
[--out ${RESULT_FILE}] \
417
+
[--eval ${EVAL_METRICS}] \
418
+
[--show]
419
+
401
420
# multi-gpu testing
402
421
bash tools/dist_test.sh \
403
422
${CONFIG_FILE} \
@@ -521,6 +540,20 @@ Difference between `resume-from` and `load-from`:
521
540
`resume-from` loads both the model weights and optimizer status, and the epoch is also inherited from the specified checkpoint. It is usually used for resuming the training process that is interrupted accidentally.
522
541
`load-from` only loads the model weights and the training epoch starts from 0. It is usually used for finetuning.
523
542
543
+
### Training on CPU
544
+
545
+
The process of training on the CPU is consistent with single GPU training. We just need to disable GPUs before the training process.
546
+
547
+
```shell
548
+
export CUDA_VISIBLE_DEVICES=-1
549
+
```
550
+
551
+
And then run the script [above](#training-on-a-single-GPU).
552
+
553
+
**Note**:
554
+
555
+
We do not recommend users to use CPU for training because it is too slow. We support this feature to allow users to debug on machines without GPU for convenience.
556
+
524
557
### Training on multiple GPUs
525
558
526
559
We provide `tools/dist_train.sh` to launch training on multiple GPUs.
@@ -533,7 +566,7 @@ bash ./tools/dist_train.sh \
533
566
[optional arguments]
534
567
```
535
568
536
-
Optional arguments remain the same as stated [above](#train-with-a-single-GPU).
569
+
Optional arguments remain the same as stated [above](#training-on-a-single-GPU).
0 commit comments