loss VS metrics in keras

link

The loss function is used to optimize your model. This is the function that will get minimized by the optimizer. 常用的有: MSE交叉熵

A metric is used to judge the performance of your model. This is only for you to look at and has nothing to do with the optimization process.

For example : For some reason you may want to minimize the MSE loss for a regression model while also want to check the AUC for the model . In this case the MSE is the loss function and the AUC is the metric . Metric is the model performance parameter that one can see while the model is judging itself on the validation set after each epoch of training. It is important to note that the metric is important for few Keras callbacks like EarlyStopping when one wants to stop training the model in case the metric isn’t improving for a certaining no. of epochs.

posted @ 2019-09-21 10:26  larkii  阅读(103)  评论(0编辑  收藏  举报