我引用了这个文档: https://www.tensorflow.org/versions/r1.1/api_docs/python/tf/contrib/metrics/streaming_auc
对于一般的流媒体指标,但让我们以 auc 为例,作为返回值的 update_op 是什么意思?您必须在调用 streaming_auc() 之后调用此操作来更新 streaming_acu() 的累加器吗?
最佳答案
您需要此操作来收集样本并建立统计数据。
直接来自 the docs :
labels = ...
predictions = ...
accuracy, update_op_acc = tf.contrib.metrics.streaming_accuracy(
labels, predictions)
error, update_op_error = tf.contrib.metrics.streaming_mean_absolute_error(
labels, predictions)
sess.run(tf.local_variables_initializer())
for batch in range(num_batches):
sess.run([update_op_acc, update_op_error])
accuracy, mean_absolute_error = sess.run([accuracy, mean_absolute_error])
关于python - tf.contrib.metrics.streaming_auc 中 update_op 返回值的用途是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43523058/