What is a loss function in simple words?

Federico picture Federico · Mar 18, 2017 · Viewed 14.4k times · Source

Can anyone please explain in simple words and possibly with some examples what is a loss function in the field of machine learning/neural networks?

This came out while I was following a Tensorflow tutorial: https://www.tensorflow.org/get_started/get_started

Answer

Piotr Trochim picture Piotr Trochim · Mar 18, 2017

It describes how far off the result your network produced is from the expected result - it indicates the magnitude of error your model made on its prediciton.

You can then take that error and 'backpropagate' it through your model, adjusting its weights and making it get closer to the truth the next time around.