Name prefix for the created ops.
Default weights with which all computed metric values are multiplied.
Graph collections in which to add the metric variables (for streaming metrics).
Graph collections in which to add the metric values.
Graph collections in which to add the metric updates.
Graph collections in which to add the metric resets.
Computes the value of this metric for the provided predictions and targets, optionally weighted by weights
.
Computes the value of this metric for the provided predictions and targets, optionally weighted by weights
.
Tuple containing the predictions tensor and the targets tensor.
Optional tensor containing weights for the values.
Name prefix for the created ops.
Created output containing the metric value.
Default weights with which all computed metric values are multiplied.
Default weights with which all computed metric values are multiplied.
Name of this metric.
Name prefix for the created ops.
Graph collections in which to add the metric resets.
Creates ops for computing the value of this metric in a streaming fashion.
Creates ops for computing the value of this metric in a streaming fashion. This function returns an op for obtaining the value of this metric, as well as a pair of ops to update its accumulated value and reset it.
Tuple containing the predictions tensor and the targets tensor.
Optional tensor containing weights for the predictions.
Name prefix for the created ops.
Tuple containing: (i) an output representing the current value of the metric, (ii) an op used to update its current value and obtain the new value, and (iii) an op used to reset its value.
Graph collections in which to add the metric updates.
Graph collections in which to add the metric values.
Graph collections in which to add the metric variables (for streaming metrics).
Weights to multiply the provided values with when computing the value of this metric.
Accuracy metric.
The accuracy metric calculates how often a set of predictions matches a corresponding set of targets. The metric creates two local variables,
total
andcount
that are used to compute the frequency with which the predictions match the targets. This frequency is ultimately returned as an idempotent operation that simply dividestotal
bycount
.For estimation of the metric over a stream of data, the function creates an
update
operation that updates these variables and returns the accuracy. Internally, anisCorrect
operation computes a tensor with elements equal to 1 where the corresponding elements of the predictions and the targets match, and 0 otherwise.update
incrementstotal
with the reduced sum of the product ofisCorrect
andweights
, and incrementscount
with the reduced sum ofweights
.If
weights
isNone
, the weights default to 1. Use weights of0
to mask values.