...

/

Build a Neural Network with Keras

Build a Neural Network with Keras

Learn how to create a neural network using Keras.

Python boasts a few large ML libraries such as PyTorch and TensorFlow. They are complex, and they tend to evolve fast. We will not use them in this course.

Instead, we will use a slimmer and more stable library named Keras. Keras is a thin layer that sits on top of the “big” libraries and hides them behind a nice, clean programming interface. Keras started out as a tool for prototyping, but it quickly became one of the most popular ways to build neural networks in Python — it was even adopted by TensorFlow as an official interface. With Keras, we can use the heavyweight libraries without getting bogged down by their complexities.

A plan and a piece of code

Let’s build a neural network for the Echidna dataset. We can use the MNIST network that we designed back in Designing the Network as a starting point.

As a reminder, MM is the number of examples in the training set, and 784784 is the number of input variables in MNIST. Here is how we can modify this network to learn the Echidna dataset instead:

  1. The Echidna dataset has two input variables, so we only need two input
...