1 The weights in the network are optimized using a cost function, typically the negative log likelihood for binary classification.
“the weights are optimized by using some sort of cost function usually the maximum likelihood method for binary classification”