Keras官方文件:點選開啟連結

1.Ubuntu初始環境配置

(1)系統軟體更新

sudo apt-get update
sudo apt-get upgrade

  (2)安裝python基礎開發包

sudo apt install -y python-dev python-pip python-nose gcc g++ git gfortran vim

(3)安裝運算加速庫

 sudo apt install -y libopenblas-dev liblapack-dev libatlas-base-dev

2.Keras環境搭建

(1)開發包安裝

sudo pip install -U --pre pip setuptools wheel
sudo pip install -U --pre numpy scipy matplotlib scikit-learn scikit-image
sudo pip install -U --pre tensorflow
sudo pip install -U --pre keras

(2)安裝完成之後在終端中輸入

python3
import tensorflow
import keras

無報錯即可

3.Keras測試minst資料集

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

開啟你的全新之旅吧!