虚拟机版本:VMWare 8.0.1

Linux版本:ubuntu14.04 64位

1、安装Theano

sudo apt-get install python-pip

sudo apt-get install python-numpy

sudo apt-get install python-scipy

sudo apt-get install python-dev

sudo apt-get install python-nose

sudo apt-get install g++

sudo apt-get install git

sudo apt-get install libopenblas-dev

sudo pip install Theano

2、安装libyaml

wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz

tar -xzvf yaml-0.1.4.tar.gz

cd yaml-0.1.4

./configure --prefix=/usr/local

make

sudo make install

3、安装Keras

git clone https://github.com/fchollet/keras.git

cd keras

sudo python setup.py install

4、将backends从tensorflow切换到theano

gedit ~/.keras/keras.json

{

    "image_dim_ordering":"tf",

    "epsilon":1e-07,

    "floatx":"float32",

    "backend":"theano"

}

5、测试

python

>>>from keras.models import Sequential

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐