tf.contrib.metrics.accuracy( predictions, labels, weights=None, name=None )
See the guide: Metrics (contrib) > Metric
Computes the percentage of times that predictions matches labels.
predictions: the predicted values, a
Tensorwhose dtype and shape matches 'labels'.
labels: the ground truth values, a
Tensorof any shape and bool, integer, or string dtype.
weights: None or
Tensorof float values to reweight the accuracy.
name: A name for the operation (optional).
ValueError: if dtypes don't match or if dtype is not bool, integer, or string.
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.