In the learning process, the network is presented with a pair of patterns, an input pattern and a corresponding desired output pattern. The network computes its own output pattern using its (mostly incorrect) weights and thresholds. Now, the actual output is compared with the desired output. Hence, the error at any output in layer k is