From 76f0eeae94ee1e014d5e02531e0b26c84e6adc9c Mon Sep 17 00:00:00 2001 From: Kaipeng Deng Date: Wed, 25 Dec 2019 11:20:59 +0800 Subject: [PATCH] fix yolov3 cpu (#4122) --- PaddleCV/yolov3/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PaddleCV/yolov3/train.py b/PaddleCV/yolov3/train.py index 77ea678f..6dab2c80 100644 --- a/PaddleCV/yolov3/train.py +++ b/PaddleCV/yolov3/train.py @@ -77,8 +77,8 @@ def train(): loss = model.loss() loss.persistable = True - devices_num = get_device_num() - print("Found {} CUDA devices.".format(devices_num)) + devices_num = get_device_num() if cfg.use_gpu else 1 + print("Found {} CUDA/CPU devices.".format(devices_num)) learning_rate = cfg.learning_rate boundaries = cfg.lr_steps -- GitLab