Linux系统安装theano和keras
虚拟机版本: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
更多推荐
所有评论(0)