It is not yet clear for me what metrics are (as given in the code below). What exactly are they evaluating? Why do we need to define them in the model
From an implementation point of view, losses and metrics are actually identical functions in Keras:
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow.keras as Keras
>>> print(Keras.losses.mean_squared_error == Keras.metrics.mean_squared_error)
True
>>> print(Keras.losses.poisson == Keras.metrics.poisson)
True