0 votes
1 view
in Machine Learning by (14.7k 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.2k 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:

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...