This is calculated effectively as the average squared difference between the predicted values and the actual value.
The mean squared error loss function measures the average of the squares of the errors. For example below is the few commonly used loss function for Keras: Mean Squared Error Keras provides a bunch of loss functions. So our aim is to reduce the value produced by loss function with the help of optimization function. If predicted values deviate too much from actual values, loss function will produce a very large number. Loss is a way of calculating how well an algorithm fits the given data. Loss function has a critical role to play in machine learning.
Keras is developed by Google and is fast, modular, easy to use. Keras does not support low-level computation but it runs on top of libraries like Theano or Tensorflow. Keras is a library for creating neural networks.