ValueError "You are trying to use the old GPU server" when importing keras

I am using Keras with Theano backend on Ubuntu 16.04. My setup works without problems, however suddenly I get the following error when importing Keras ( import keras ):

ValueError: you are trying to use the old GPU server. He was removed from Teano. Now use device = cuda *. See https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29 for details.

How do i solve this? Please help, thanks in advance.

+8
python theano machine-learning cuda keras
source share
1 answer

You must change (or add) your environment variable called THEANO_FLAGS . If you set the variable to contain device=cuda instead of device=gpu , the error will disappear.

More information about this variable can be found here .

+11
source share

All Articles