Looking at tensorflow docs for MAE, I saw that tf.metrics.mean_absolute_error will return:
mean_absolute_error
: A Tensor representing the current mean, the value of total divided by count.update_op
: An operation that increments the total and count variables appropriately and whose value matches mean_absolute_error.
How to implement this for evaluation purpose? As stated here:
mean_absolute_error is intended for evaluation and so it doesn't have a gradient. mean_absolute_error also returns an update op (which are you ignoring in the code above) that must be used to update the mean, so the concept of a gradient for this function doesn't really make sense. The update op for tf.metrics.mean_absolute_error(pred, y) must be called before the mean can be obtained.
I don't know how to deal with returned value from mean_absolute_error
function. Can someone write a simple example with this function? Thanks a lot.