December 2018
Intermediate to advanced
764 pages
18h 18m
English
Next, we define the loss function using the mean squared error (MSE). MSE is defined as follows:

The difference in the actual and estimated value of y is known as residual. The loss function calculates the mean of squared residuals. We define it in TensorFlow in the following way:
loss = tf.reduce_mean(tf.square(model - y_tensor))
Read now
Unlock full access