Loss function

A model learns by improving upon the loss function or the objective function. The task is to learn optimal parameters using backpropagation to minimize the difference between the original color image and the output of the model. The output color image from the model is also referred to as the hallucinated colorization of the grayscale image. In this implementation, we utilize the mean squared error (MSE) as our loss function. The following equation summarizes it:

Loss function between original color and colornet output (Source: Baldassarre and co-author)

In the case of Keras, using this loss function is as easy as setting a parameter while compiling the Keras model. We utilize the RMSprop optimizer to train our model (the paper uses Adam instead).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.86.154