At this point, we have a working neural network. For this simple example, we will add one additional feature of neural networks that can improve performance, which is backpropagation. A neural network can learn to solve a task by multiplying the variable by values so that the variables are weighted as they pass through hidden layers. The backpropagation step allows the model to traverse back through layers and adjust the weights that were learned during previous steps:
- In practical terms, this step is quite straightforward to implement. We simply declare that we will use the backpropagation algorithm and indicate the learning rate, which controls how much the weights are adjusted. In general, this learning rate value should be very low.
In the following example, we have to do the following:
- The threshold value and stepmax value...