{ }
View source on GitHub |
Computes precision@k of the predictions with respect to sparse labels.
tf.compat.v1.metrics.precision_at_top_k(
labels,
predictions_idx,
k=None,
class_id=None,
weights=None,
metrics_collections=None,
updates_collections=None,
name=None
)
Differs from sparse_precision_at_k
in that predictions must be in the form
of top k
class indices, whereas sparse_precision_at_k
expects logits.
Refer to sparse_precision_at_k
for more details.