How to Train a Neural Network

Part 1: The Need for Data

So, how do you train an Artificial Neural Network (ANN)?

When building a neural network, you need to identify what kind of network you want to build based on the problem you are trying to solve. You also need to determine the types of data needed, the structure of the network, and which algorithms to use.  

Our Problem: We want to train our ANN to recognize and classify critters as dogs, cats, or squirrels.

Our Approach:

For the purposes for this article we developed a simple ANN model called Critters. Our Critters model is trained to recognize and classify three types of critters: dogs, cats and squirrels. It is a monolayer, FeedForward Network (FFN).

A FeedForward Network is designed to have data flowing forward in the trained model, and there is no cycling of data backwards between layers or within a layer. The monolayer descriptor suggests that there is only an input and output layer (i.e., there are no hidden layers). This type of model, with no hidden layers, would not normally be used for the majority of real Artificial Intelligence (AI) applications, but it is great for this simple demonstration. 

Visually, our Critters model looks like this: 

Critter Model

The input layer provides the input data for each of the features to each of the neurons in the next layer. Note the mesh connections between the input layer and the output layer. We’ll describe each layer, their connections and their calculations as we step through this example model. 

The Types of Data Needed

As with all ANNs, some human intervention is required before the network can start learning how to categorize its data (in our case, before it can classify the critters). So, before machine learning starts, the critters must be described in some fashion by input data. This can be done using pictures, characteristic descriptions, sounds, or other ways. 

For the input data, we used descriptive information about the critters: tail length, ear size, shoulder height, weight, lifespan, hair length, temperament, and whether it's deemed indoor or outdoor. These are the features. A subset of our data is shown in the table below.

Sample Data

Each row in our table represents a training sample that includes eight critter features. (Please note that we only displayed six of fifteen training samples in the table above. Most neural network models would actually include hundreds, thousands, or even more training samples!)

How to Normalize the Data

All data used to describe the critters has to be converted into an associated number value before being placed into the input layer of the ANN. After converting the feature descriptions to a number, the subset of data will look like this: 

Normalized Data

The training data set is then normalized into a range of 0 to 1 using this formula: 

Normalization Formula

In our example, if we selected Cat1 Critter Shoulder Height the equation would read: (15 - 2) / (45 - 2) = 0.3023)

Applying this equation across the entire table, the normalized data set would become:

Normalized Data Set

We will also need to consider weighted values for each feature, but we’ll discuss these weights when we explain the activation formulas in the Critters model. 

Input Layer 

Now that we have training data, what does the start of this machine look like? Since we have eight features for each training data set, we have eight input neurons or cells in the input layer. Each cell represents the data for one feature. 

Model Inputs

Now that we have defined the data that will be used to train the network, the next step is to focus on the method that will be used to train the model. Details about this will be included in a subsequent article.

To learn more about AI in wireless, connect with us on Twitter and LinkedIn. You can also check out all of Award Solutions' courses at

About the Author

Ray Sulewski is a Senior Consultant for Award Solutions. Ray joined Award Solutions in 2006, and has over 36 years of experience in telecom. At Award Solutions, Ray has been at the forefront of research and development for Artificial Intelligence as it relates to wireless. He has also been rumored to enjoy dancing at weddings, and playing fetch with his dogs.

About Award Solutions, Inc.

Award Solutions is the trusted training partner to the world's best networks. We help companies tackle new technologies by equipping their teams with knowledge and skills. Award Solutions invests heavily in technology, research, engineering, and labs to ensure our customers make the most of their resource and network investments.

Award's expertise spans advanced wireless technologies like Artificial Intelligence, Machine Learning, 5G, Network Virtualization, 4G LTE, and more.