Training a neural network

As you may have already summarized, a neural network is essentially useless until it is trained. Before we get into training, we should talk some more on how a neuron is activated. Open up the Neuron class again and take a look at the CalculateValue function. This method calculates the output based on its internal set of weights and is described by the following:

Here:

Also, keep the following in mind:

n = total number of neurons connected as inputs
I = signaled input to the Neuron class

O = calculated output

S = the sigmoid function with a graph:




Sigmoid function

Sigmoid Function essentially distributes the weighted sum of values between 0 and 1 based on a curve (function) similar to the one shown in the preceding graph. We do this in order to evenly weigh the outputs of each of the neurons. Likewise, when we look to input data into a network, we also like to normalize the values between 0 and 1. If we didn't do this, one single neuron or input could bias our entire network. This is like hitting your thumb with a hammer and only being able to feel pain in your thumb for the next several seconds, Except that we don't want our network to respond to wild inputs like that. Instead, we want to mellow our network out with the sigmoid function.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.79.88