When using the model.compile() attribute, does it matter what metric I place in there? For example, would model.complie(metric='accuracy') focus on increasing accuracy vs model.compile(metrics=[tf.keras.metrics.Precision()]) focusing on Precision? Or do these just state what shows during the epoch training?


1 Answer 1


Here are the docs for the Model.compile method.

The loss parameter is the objective function whereas the metrics parameter is a "list of metrics to be evaluated by the model during training and testing".

So your second interpretation is correct.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.