Artificial Neural Network
Artificial Neural Network
−
Neural Network with one input, two hidden neurons, two output neurons
Neural Network with two inputs, two hidden neurons, two output neurons
Additionally, the hidden and output neurons may include a bias.
we’re going to work with a single training set: given inputs 0.05 and 0.10, we want
the neural network to output 0.01 and 0.99.
The Forward Pass
To begin, lets see what the neural network currently predicts given
the weights and biases and inputs of 0.05 and 0.10. To do this we’ll
feed those inputs forward though the network.
We figure out the total net input to each hidden layer
neuron, squash the total net input using an activation function, then
repeat the process with the output layer neurons.
Here’s how we calculate the total net input for hidden node h1
Carrying out the same process for hidden node h2, we get:
We repeat this process for the output layer neurons, using the output from the hidden layer neurons as inputs.
closer to the target output, thereby minimizing the error for each
… (2)
Finally, how much does the total net input of o1 change with respect
to w5?
You’ll often see this calculation combined in the form of the delta rule:
To decrease the error, we then subtract this value from the current weight (optionally multiplied by some learning
rate, set to 0.5 in this example).
… (3)
… (4)
Therefore
Now that we have we need to figure out and then for each weight
We calculate the partial derivative of the total net input to h1 with respect to w1 the same as we did for the
output neuron:
Putting it all together: