Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
data add data Feb 13, 2017
02_CNN_MNIST.ipynb update examples, comments and links Feb 4, 2017
03_CNN_CIFAR10.ipynb bugfix Dec 7, 2017
04_CNN_TransferLearning1.ipynb update resources Dec 7, 2017


Keras is a python library for neural networks and provides a high-level inteface to Theano or Tensorflow libraries. The examples in this github repository assume that you are familiar with the theory of the neural networks. To learn more about the neural networks, you can refer the resources below.

Installation Instructions

Installation instructions for Keras (includes links to Theano and Tensorflow installaion):

To Use GPU, install CUDA:

To resolve common installation issues, refer the README on Laura Graesser's Github repository.

Using Tensorflow as backend

Keras uses Tensorflow by default. Check the contents of ~/.keras/keras.json:

    "image_dim_ordering": "tf",
    "epsilon": 1e-07,
    "floatx": "float32",
    "backend": "tensorflow"

Using Theano as backend

Edit the contents of ~/.keras/keras.json:

    "image_dim_ordering": "th", 
    "epsilon": 1e-07, 
    "floatx": "float32", 
    "backend": "theano"

Check the Backend being used

from keras import backend as K
print K.backend()
print K.image_dim_ordering()
## Set image dimesnion order for Tensorflow, so that no modifications are required in the code
if K.backend() =='tensorflow':
    print K.image_dim_ordering()

Using GPU

For tensorflow, GPU is used by default. To use GPU for Theano, add this code in the beggining of the file:

import os
os.environ["THEANO_FLAGS"] = "mode=FAST_RUN, device=gpu, floatX=float32"



Video Lectures:



Thank you to Laura Graesser for her Neural Networks workshop and WiMDS for organizing it.

You can’t perform that action at this time.