Book Image

Learning OpenCV 3 Computer Vision with Python (Update)

Book Image

Learning OpenCV 3 Computer Vision with Python (Update)

Overview of this book

Table of Contents (16 chapters)
Learning OpenCV 3 Computer Vision with Python Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
6
Retrieving Images and Searching Using Image Descriptors
Index

The structure of an ANN


Here's a visual representation of a neural network:

As you can see from the figure, there are three distinct layers in a neural network: Input layer, Hidden layer (or middle), and Output layer.

There can be more than one hidden layer; however, one hidden layer would be enough to resolve the majority of real-life problems.

Network layers by example

How do we determine the network's topology, and how many neurons to create for each layer? Let's make this determination layer by layer.

The input layer

The input layer defines the number of inputs into the network. For example, let's say you want to create an ANN, which will help you determine what animal you're looking at given a description of its attributes. Let's fix these attributes to weight, length, and teeth. That's a set of three attributes; our network will need to contain three input nodes.

The output layer

The output layer is equal to the number of classes we identified. Continuing with the preceding example of an animal...