What is “metrics” in Keras?

后端 未结 4 2180
滥情空心
滥情空心 2020-12-12 18:44

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

4条回答
  •  孤街浪徒
    2020-12-12 18:58

    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
    

提交回复
热议问题