Put AI to work
June 26-27, 2017: Training
June 27-29, 2017: Tutorials & Conference
New York, NY

Introduction to neural networks with Keras

Laura Harding Graesser (New York University)
1:30pm5:00pm Tuesday, June 27, 2017
Implementing AI
Location: Sutton North Level: Beginner
Secondary topics:  Deep Learning
Average rating: *****
(5.00, 1 rating)

Prerequisite Knowledge

  • A basic knowledge of Python, linear algebra, and calculus

Materials or downloads needed in advance

  • A laptop with Python, Keras, Theano or TensorFlow, Matplotlib, and Git installed

What you'll learn

  • Understand what neural networks are, what they are used for, and how to get started building and training your own with Keras


Neural networks have driven breakthrough results in computer vision, speech processing, machine translation, and reinforcement learning. They are powerful function approximators and are an elegant and fascinating family of algorithms.

Laura Graesser offers a hands-on introduction to neural networks using the popular Python library Keras, focusing on what neural networks are, why they are powerful algorithms, and why they have a particular structure. Laura begins by introducing the core components of a neural network, nodes, weights and biases, activation functions, and layers before walking you through building a deep feed-forward network step by step. Along the way, Laura explains how a neural network learns and covers the backpropagation algorithm.

You’ll then build a neural network in Keras to try to solve is a classic classification problem: identifying handwritten digits from grayscale images. Laura concludes by exploring the challenges that arise when training neural networks, with a focus on overfitting, as well as a potential remedy: regularization.

Photo of Laura Harding Graesser

Laura Harding Graesser

New York University

Laura Graesser is a graduate student at New York University, where she is working toward a master’s degree in computer science with a focus on machine learning. In her spare time, Laura enjoys experimenting with and writing about machine learning techniques. Laura is particularly interested in neural networks and their application to computer vision problems, cross-fertilization between computer vision and NLP, and the representations perspective.

Comments on this page are now closed.


Picture of Laura Harding Graesser
Laura Harding Graesser | STUDENT
06/27/2017 7:45pm EDT

Hi Bhaskar,

Thanks for the feedback! I’m really glad you enjoyed the session.

I don’t think the session was recorded, however the slides are available here: https://github.com/lgraesser/Intro-to-Neural-Networks-O-Reilly-AI/blob/master/OReilly_presentation.pdf.

Best wishes,

06/27/2017 4:10pm EDT

Hi Laura,

I had to leave your session early due to a business meeting. The talk was great! I was wondering if we can get a copy of the slides, and find a recording of the session somewhere?



Picture of Laura Harding Graesser
Laura Harding Graesser | STUDENT
06/26/2017 8:49pm EDT

Hi Craig,

Glad to hear that you got it working. Looking forward to seeing you tomorrow.


06/26/2017 8:09pm EDT

Thanks Laura.

I still had difficulties with Tensorflow, but I was able to update the keras.json to use Theano and it appears to be working now.

See you tomorrow.

Picture of Laura Harding Graesser
Laura Harding Graesser | STUDENT
06/25/2017 8:21pm EDT

Hi Craig,

Thanks for your message. I’m looking forward to seeing you at the tutorial on Tuesday.

Python 2.7 shouldn’t cause any issues, nor should having both Theano and Tensorflow installed.

“Tensorflow not installed” sounds like a Keras issue. Usually this happens because Tensorflow isn’t installed in the environment you are using but the Keras backend is still set to Tensorflow. You can check which backend Keras is using by looking at the keras.json file located here: $HOME/.keras/keras.json.

The first thing to check is that Tensorflow is actually installed in the Anaconda environment you are using to launch the Jupyter notebook. At the command line you used to launch the Jupyter notebook type “conda list”. This will print all of the libraries installed in the anaconda environment. Check if Tensorflow is installed. You’ll also be able to see here if Theano is installed.

If Tensorflow isn’t installed and you want to use it for this tutorial then repeat the steps in the machinelearningmastery tutorial to see what went wrong.

If it is installed then there might be an issue with the Jupyter paths. At the command line type “python”. This will launch an interactive python shell. Then try and import Tensorflow and Keras by typing “import tensorflow” and “import keras”. If this works then follow Lucy Park’s tutorial (linked to in the troubleshooting section of this tutorial’s instructions) to fix the paths.

Let me know how this goes and if you continue to have any issues running the notebooks.

Best wishes,

06/25/2017 9:53am EDT

HI Laura, I’m looking forward to your workshop on Tuesday Just trying to get everything installed and setup beforehand, but I seem to be having a few issues.

The Tensorflow workshop I’m taking Tuesday morning has asked for Python 2.7, so I installed Anaconda with 2.7 instead of 3.6. Then I used this tutorial to install both TensorFlow and Keras


When I try to run your examples via Jupyter notebook, I’m get an error saying “tensorflow not installed”. Is that because I’m running 2.7 instead of 3.5? I’m on a Mac running Sierra OS 10.12.5. Do I need to specify somewhere to use TensorFlow instead of Theano or vice versa?

I think Theano comes with Anaconda, but I’ve read somewhere there can be issues with having both TensorFlow and Theano installed. Not sure if this is causing problems or not a big deal?

Any help you can offer would be great. Happy to provide more info if that would be beneficial.

Thanks so much,