diff --git a/static/tools/train.py b/static/tools/train.py index 490e77b8ed208e8fbd9cd58d4b427fc8b01b69ef..15de75953487ac2c19b5402479c2fdd94a2e797d 100644 --- a/static/tools/train.py +++ b/static/tools/train.py @@ -112,7 +112,7 @@ def main(): if cfg.use_gpu: devices_num = fluid.core.get_cuda_device_count() - if cfg.use_npu: + elif cfg.use_npu: devices_num = fluid.core.get_npu_device_count() elif use_xpu: # ToDo(qingshu): XPU only support single card now