To train the network through supervised learning, the model’s predicted output is compared to the actual output (that is known to be correct) and the difference between these two results is measured and is known as the cost or cost value. The purpose of training is to reduce the cost value until the model’s prediction closely matches the correct output. This is achieved by incrementally tweaking the network’s weights until the lowest possible cost value is obtained. This process of training the neural network is called back-propagation.