The loss function

We will use the mean_squared _error function—TensorFlow provides us with many such functions. We pass the observed values and the predicted values and this function calculates the mean squared error. The following screenshot shows the lines of code used for showing the mean_squared _error function: