KichangKim / DeepDanbooru

AI based multi-label girl image classification system, implemented by using TensorFlow.
MIT License
2.65k stars 260 forks source link

Colab user: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected #17

Closed kld123509945 closed 4 years ago

kld123509945 commented 4 years ago

Hi, @KichangKim in your sample code: https://colab.research.google.com/drive/1BOSYlrWzBHI60NCZF18PIdmwVgsy2tCT I notice that when I'm evaluating the images, the evaluate code will inform me as:

2020-02-19 06:09:25.243632: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected

And the code I'm running is on GPU mode:

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 | | N/A 65C P8 11W / 70W | 0MiB / 15079MiB | 0% Default | +-------------------------------+----------------------+----------------------+

So does this mean that the evaluate.py is running without CUDA? So could I open CUDA on colab when I'm running it? Many thanks!

KichangKim commented 4 years ago

If you want use GPU for evaluating, add --allow-gpu flag to command. The error message without that flag is normal , because DeepDanbooru uses force CPU mode by default.

kld123509945 commented 4 years ago

If you want use GPU for evaluating, add --allow-gpu flag to command. The error message without that flag is normal , because DeepDanbooru uses force CPU mode by default.

Thanks for your detailed instructions!