Search code examples
machine-learningkerasneural-networkartificial-intelligence

What is the default behavior of Keras model.compile metrics parameter?


The default value for Keras model.compile metrics parameter is metrics=None. There are a plenty of explanations and information about this parameter different values, and I believe I pretty much understand their meaning and purpose, but what I struggle finding, is what is the behavior of the default value metrics=None.

The official documentation of the model.compile method here doesn't say anything about the default value (which is None), and googling about it for a while hasn't brought any enlightenment for me either so far.

I'd be greatful for any helpful hint on this!


Solution

  • It means it will not calculate any metric, it is not necessary to specifiy a metric. The only parameters that need to be specified are optimizer and loss.

    These are the only things necessary to train a model, the metric doesn't go into the calculation for backpropagation.

    By not specifing metric, simply no metric will be calculated. A metric is something extra that is calculated for you to simbolize how well a problem is being solved. Usually for classification you would use cross entropy.