Building a deep neural network

We are now ready to build a deep neural network. A deep neural network consists of an input layer, many hidden layers, and an output layer. This looks like the following:

Building a deep neural network

The preceding figure depicts a multilayer neural network with one input layer, one hidden layer, and one output layer. In a deep neural network, there are many hidden layers between the input and the output layers.

How to do it…

  1. Create a new Python file, and import the following packages:
    import neurolab as nl
    import numpy as np
    import matplotlib.pyplot as plt
  2. Let's define parameters to generate some training data:
    # Generate training data min_value = -12 ...

Get Python Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.