Skip to content

Instantly share code, notes, and snippets.

View lioutasb's full-sized avatar
🤖

Vasileios Lioutas lioutasb

🤖
View GitHub Profile
@lioutasb
lioutasb / mrr_metric.py
Created July 26, 2018 23:09
Tensorflow implementation of Mean Reciprocal Rank (mrr) metric compatible with tf.Estimator
import tensorflow as tf
def mrr_metric(labels, predictions, weights=None,
metrics_collections=None,
updates_collections=None,
name=None):
with tf.name_scope(name, 'mrr_metric', [predictions, labels, weights]) as scope: