Hanfei Sun
Hanfei Sun

Reputation: 47071

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

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?

Upvotes: 7

Views: 2641

Answers (1)

kww
kww

Reputation: 549

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

Upvotes: 13

Related Questions