Using MXNet in Keras

By popular demand, DMLC has added MXNet support for Keras. Please follow these steps for having it:

  1. After having CUDA driver, install MXNet like
    pip install mxnet-cu80
  2. Install Keras with MXNet support:
    git clone --recursive https://github.com/dmlc/keras
    cd keras
    python setup.py install
  3. Assign MXNet as Keras backend:
    KERAS_BACKEND=mxnet python -c "from keras import backend"

    “Using MXNet backend.” means Keras+MXNet is successfully installed. Enjoy.

Q&A:

  1. I am using Windows, can I have it? Yes, just replace step 1 with pip install mxnet-cu80-win
  2. I don’t have a GPU, can I have a try? Yes, just replace step 1 with pip install mxnet or pip install mxnetmkl if you have Intel CPU(s).
  3. How is compared to TensorFlow backend? em, do you want to benchmark it? Please feel free to submit benchmark results and bugs to github issue.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s