您可以在没有cuda的情况下安装和使用keras,但是你无法使用intel高清显卡加速gpu.
如果你使用Theano作为keras的后端,首先安装Theano:
# for python2
pip install theano
# for python3
pip3 install theano
然后像这样设置〜/ .theanorc文件:
[global]
floatX = float32
device = cpu
allow_gc = True
[blas]
ldflags = -lopenblas
如果您使用TensorFlow作为keras的后端,只需安装TensorFlow的CPU版本即可.
# for python2.7
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0-cp27-none-linux_x86_64.whl
# for python3.4
pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0-cp34-cp34m-linux_x86_64.whl
# for python3.5
pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0-cp35-cp35m-linux_x86_64.whl
然后安装keras:
# for python2
pip install keras
# for python3
pip3 install keras