Skip to content

Commit

Permalink
Update README.md and setup.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Aug 25, 2017
1 parent 2d8739d commit 1f61646
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 19 deletions.
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,37 +112,44 @@ In the [examples folder](https://github.com/fchollet/keras/tree/master/examples)

## Installation

Keras uses the following dependencies:
Before installing Keras, please install one of its backend engines: TensorFlow, Theano, or CNTK. We recommend the TensorFlow backend.

- numpy, scipy
- yaml
- HDF5 and h5py (optional, required if you use model saving/loading functions)
- Optional but recommended if you use CNNs: cuDNN.
- [TensorFlow installation instructions](https://www.tensorflow.org/install/).
- [Theano installation instructions](http://deeplearning.net/software/theano/install.html#install).
- [CNTK installation instructions](https://docs.microsoft.com/en-us/cognitive-toolkit/setup-cntk-on-your-machine).

You may also consider installing the following **optional dependencies**:

*When using the TensorFlow backend:*
- cuDNN (recommended if you plan on running Keras on GPU).
- HDF5 and h5py (required if you plan on saving Keras models to disk).
- graphviz and pydot (used by [visualization utilities](https://keras.io/visualization/) to plot model graphs).

- TensorFlow
- [See installation instructions](https://www.tensorflow.org/install/).
Then, you can install Keras itself. There are two ways to install Keras:

*When using the CNTK backend:*
- **Install Keras from PyPI (recommended):**

- CNTK
- [See installation instructions](https://docs.microsoft.com/en-us/cognitive-toolkit/setup-cntk-on-your-machine).
```sh
sudo pip install keras
```

If you are using a virtualenv, you may want to avoid using sudo:

```sh
pip install keras
```

*When using the Theano backend:*
- **Alternatively: install Keras from the Github source:**

- Theano
- [See installation instructions](http://deeplearning.net/software/theano/install.html#install).
First, clone Keras using `git`:

To install Keras, `cd` to the Keras folder and run the install command:
```sh
sudo python setup.py install
git clone https://github.com/fchollet/keras.git
```

You can also install Keras from PyPI:
Then, `cd` to the Keras folder and run the install command:
```sh
sudo pip install keras
cd keras
sudo python setup.py install
```

------------------
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
url='https://github.com/fchollet/keras',
download_url='https://github.com/fchollet/keras/tarball/2.0.7',
license='MIT',
install_requires=['theano', 'pyyaml', 'six'],
install_requires=['numpy>=1.9.1',
'scipy>=0.14',
'six>=1.9.0',
'pyyaml'],
extras_require={
'h5py': ['h5py'],
'visualize': ['pydot>=1.2.0'],
Expand Down

0 comments on commit 1f61646

Please sign in to comment.