Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (19k points)

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? Why we can have multiple metrics in one model? And more importantly what is the mechanics behind all this? Any scientific reference is also appreciated.

model.compile(loss='mean_squared_error',

              optimizer='sgd',

              metrics=['mae', 'acc'])

1 Answer

0 votes
by (33.1k points)
edited by

We use metrics in keras for the following reasons:

  1. They measure the performance of your network using non-differentiable functions.
  2. Help to obtain values of different loss functions when your final loss is a combination of a few of them
  3. Track a measure with respect to which you don't want to directly optimize your model

Hope this answer helps you! Going through the Tensorflow Tutorial will also affect the way this problem could be solved.

Watch this video to know more about Keras:

...