>>>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