2017-04-20 9 views
0

でupdate_op戻り値の目的は何ですか:一般的にはストリーミングメトリックの https://www.tensorflow.org/versions/r1.1/api_docs/python/tf/contrib/metrics/streaming_auc私は、このマニュアルを参照しtf.contrib.metrics.streaming_auc

が、簡単な例として使用AUCをすることができます、の意味は何であります戻り値としてupdate_op? streaming_acu()のフードの下でアキュムレータを更新するためにstreaming_auc()を呼び出した後、この操作を呼び出す必要がありますか?

答えて

1

サンプルを収集して統計を構築するには、この操作が必要です。

ストレート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]) 
関連する問題