1. First install Python, I install the pythoh2.7 version, installation steps
1) Enter in the terminal in turn
TAR–JXVF python-2.7.12.tar.bz2
CD Python-2.7.12
./configure
Make
Make install
2) Testing
Terminal input Python jump into editor
2. Install the Python Basic Development Kit
# 系统升级
sudo apt update
sudo apt upgrade
sudo apt install-y python-dev python-pip python-nose gcc g++ git gfortran vim
3. Install Operation Acceleration Library
sudo apt install-y libopenblas-Dev liblapack-Dev libatlas-base-Dev
4. Install the relevant development kit
Install PIP,sudo pip install-U--pre pip Setuptools Wheel
Install numpy,scipy, Matplotlib,scklearn Pack,sudo pip install-U--pre numpy scipy matplotlib scikit-learn scikit-image
Installationtheano
,sudo pip install -U --pre theano
安装keras,sudo pip install -U --pre keras
5.keras Environment settings
1) Modify the default Keras backend in终端
Input in:
gedit ~/.keras/keras.json
2) Configure the Theano file in the 终端
input:
gedit ~/.theanorc
6.本人采用的是cpu加速,故在theanorc
中输入
[global]
openmp=True
device = cpu
floatX = float32
allow_input_downcast=True
[blas] ldflags= -lopenblas
Install Kears under Linux