How to install Keras with gpu support?

前端 未结 4 1656
长发绾君心
长发绾君心 2021-01-01 20:00

I installed Tensorflow for GPU using: pip install tensorflow-gpu But when I tried the same for Keras pip install keras-gpu, it pu

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-01 20:29

    Adding to the answer above which is the correct answer in terms of recommending to use Anaconda package manager, but out of date in that there is now a keras-gpu package on Anaconda Cloud.

    So once you have Anaconda installed, you simply need to create a new environment where you want to install keras-gpu and execute the command:

    conda install -c anaconda keras-gpu

    This will install Keras along with both tensorflow and tensorflow-gpu libraries as the backend. (There is also no need to install separately the CUDA runtime and cudnn libraries as they are also included in the package - tested on Windows 10 and working).

提交回复
热议问题