Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between tf.losses and tf.metrics?

Tags:

tensorflow

In this example, tf.losses.mean_squared_error is used for the loss parameter of EstimatorSpec, while tf.metrics.root_mean_squared_error is used for eval_metric_ops parameter.

Does anyone have ideas what is the main difference between tf.loss and tf.metrics?

like image 496
Hanfei Sun Avatar asked Oct 27 '17 19:10

Hanfei Sun


People also ask

What is metrics in Tensorflow?

A metric is a function that is used to judge the performance of your model. Metric functions are similar to loss functions, except that the results from evaluating a metric are not used when training the model. Note that you may use any loss function as a metric.

What is accuracy metric in Tensorflow?

The accuracy function tf. metrics. accuracy calculates how often predictions matches labels based on two local variables it creates: total and count , that are used to compute the frequency with which logits matches labels .


1 Answers

A tf.loss ('s derivative) is used to update the model during backpropagation. tf.metrics are for evaluating the model.

like image 187
kww Avatar answered Sep 30 '22 07:09

kww