Installation
Before installing Keras, please install one of its backend engines: TensorFlow, Theano, or CNTK. We recommend the TensorFlow backend.
- TensorFlow installation instructions. (已安裝)
- Theano installation instructions.
- CNTK installation instructions.
You may also consider installing the following optional dependencies:
- cuDNN (recommended if you plan on running Keras on GPU). (已安裝)
- HDF5 and h5py (required if you plan on saving Keras models to disk). (sudo pip install h5py)
- graphviz and pydot (used by visualization utilities to plot model graphs). (
sudo apt install python-pydot python-pydot-ng graphviz
)
Then, you can install Keras itself. There are two ways to install Keras:
- Install Keras from PyPI (recommended):
sudo pip install keras
If you are using a virtualenv, you may want to avoid using sudo: (在創建的tensorflow虛擬環境下安裝)
pip install keras