propagateBackwards method
Performs the backpropagation algorithm by comparing the observed values with the expected values, and propagates each layer using the knowledge of the network's 'cost', which indicates how bad the network is performing.
Implementation
void propagateBackwards(List<double> input, List<double> expected) {
final observed = process(input);
var errors = subtract(expected, observed);
for (var index = layers.length - 1; index > 0; index--) {
errors = layers[index].propagate(errors);
}
}