简体   繁体   中英

Using GPU with Keras

i'm actally facing a probleme since last friday and didn't find a solution for the moment.

First of all, you need to know that i'm a beginner on linux,i'm trying to do some deep learning in my internship, and i discovered that even if my company have a 1080 Ti, keras wasn't using it, so have the job to correct this.

I am trying to use Keras with GPU. I installer Tensorflow by following these steps : https://www.tensorflow.org/install/install_linux I also installer CUDA,cuDNN.

I found on my machine an older installation of CUDA (version 7.5). I installed version 9.2 without uninstalling version 7.5. I added the PATH variables but it seems like it is not taking in account : [][ https://i.stack.imgur.com/B3Pqm.png]

I tried to uninstall CUDA version 7.5 but i don't know how to do it, since in the usr/local folder, there is no cuda-7.5 folder.

When i enter nvidia-smi in the prompt, it works correctly. I installed tensorflow and tensorflow-gpu, but i does not work : [][ https://i.stack.imgur.com/78gPd.png]

Did anyone know how to help me? i Guess the solution of my probleme is not really complicated for someone who knows Ubuntu, and i feel like i'm loosing a lot of times doing something i don't really understand.

If someone need some further informations in order to help me, feel free to ask.

Thank you

Uninstall tensorflow and install only tensorflow-gpu. You should not install both. If you are using keras, then install keras-gpu.

Let's say you are working with conda and you want to tidy up all this. Do

conda remove keras
conda remove tensorflow*
conda install keras-gpu

If you are not, then i highly recommend Anaconda for dealing with these issues which you seem to be having stress-free.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM