How to Create a Custom Loss Function | Keras

For Neural Nets

Shiva Verma
Towards Data Science
3 min readApr 16, 2020

--

Photo by Isaac Smith on Unsplash

The Loss Function is one of the important components of Neural Network. Loss is nothing but a prediction error of Neural Net. And the method to calculate the loss is called Loss Function.

Loss is used to calculate the gradients for the neural net. And gradients are used to update the weights. This is how a Neural Net is trained.

--

--