What is the "metric" in Keras?

It’s not clear to me yet what metrics(as indicated in the code below). What exactly do they rate? Why do we need to define them in model? Why can we have several indicators 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'])
+6
source share
3 answers

, , metrics, , loss. loss. A loss - , , . , , , metric: , , , . , loss , . , metrics:

  • :. ( ), w.r.t. . - , .

  • , : , , , 0 , . metrics, , .

  • , :, - , , mse, , cosine-distance . - metrics.

, , . , , keras. :

  • metrics, : , . keras , , . , , keras.backend.

  • keras.callback: Callbacks, . model, model.predict . - , - . - .

, , .

+8
+2

: Keras Metrics

keras metrics, a metric . metrics compile , . :

  • binary_accuracy

  • categorical_accuracy

  • sparse_categorical_accuracy

  • top_k_categorical_accuracy

  • sparse_top_k_categorical_accuracy

- , metrics .

. , dictionary list.

One important resource that you must specify for diving deep into the metric can be found here.

+1
source

All Articles