ubuntu配置keras与tensorflow后端

配置keras

远端服务器:ubuntu14.04

##系统升级
>>>sudo apt update
>>>sudo apt upgrade
##安装python开发包
>>>sudo apt install -y python-dev python-pip python-nose gcc g++ git gfortran vim

安装运算加速库

>>>sudo apt install -y libopenblas-dev liblapack-dev libatlas-base-dev

keras搭建

相关开发包

>>> sudo pip install -U --pre pip setuptools wheel
>>> sudo pip install -U --pre numpy scipy matplotlib scikit-learn scikit-image
>>> sudo pip install -U --pre theano
>>> sudo pip install -U --pre keras
>>> import theano
>>> import keras

配置安装tensorflow后端

>>>sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

如果提示缺少 h5py包,用pip install h5py 即可解决

你可能感兴趣的:(ubuntu配置keras与tensorflow后端)