Reputation: 47071
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
Reputation: 549
A tf.loss
('s derivative) is used to update the model during backpropagation. tf.metric
s are for evaluating the model.
Upvotes: 13