code: def _mrr(self, pos_scores, neg_scores):
      scores_all = tf.concat([neg_scores, pos_scores], axis=2)
      size = tf.shape(scores_all)[2]
      _, indices_of_ranks = tf.nn.top_k(scores_all, k=size)
      _, ranks = tf.nn.top_k(-indices_of_ranks, k=size)
      return tf.reduce_mean(
          tf.reciprocal(tf.to_float(ranks[:, :, -1] + 1))
      )
  
file_path: euler/examples/TransX/transX.py
imports: import tensorflow
  import tf_euler
  import collections
label_desc: Use image node_id 6 for calling the TransX obj's underlying member method code with example usage: obj._mrr(pos_scores, neg_scores) and returns: tf