ubuntu14.04 Keras框架搭建

>>>sudo su
>>> pip3 install -U --pre pip setuptools wheel

>>> pip3 install -U --pre numpy scipy matplotlib scikit-learn scikit-image

>>> pip3 install -U --pre tensorflow-gpu

# >>>pip3 install -U --pre tensorflow ## CPU版本

>>> pip3 install -U --pre keras

安装完毕后,输入python,然后输入

>>> import tensorflow
>>> import keras

无错输出即可.

Keras中mnist数据集测试

下载Keras开发包

>>> git clone https://github.com/fchollet/keras.git
>>> cd keras/examples/
>>> python mnist_mlp.py

程序无错进行,至此,keras安装完成。

参考:

https://keras-cn.readthedocs.io/en/latest/for_beginners/keras_linux/#keras

猜你喜欢

转载自www.cnblogs.com/sea-stream/p/10416140.html
今日推荐