import tensorflow as tf

    improvement = (mean_dist-mean_pred_error)/mean_dist

    pairwise_improvement = tf.nn.relu(dists[1:] - pred_error)
    pairwise_improvement_bool = tf.cast(pairwise_improvement > 0, pairwise_improvement.dtype)
    self.pairwise_improvement_bool = pairwise_improvement_bool

    metrics.append(tf.summary.scalar('training/avg_dist', mean_dist))
    metrics.append(tf.summary.scalar('training/pred_dist', mean_pred_error))
    metrics.append(tf.summary.scalar('training/improvement', improvement))
    metrics.append(tf.summary.scalar('training/improvement_abs', tf.nn.relu(improvement)))
    metrics.append(tf.summary.histogram('training/improvement_abs_hist', nut.nan_to_zero(improvement)))
    metrics.append(tf.summary.scalar('training/improvement_pairwise', tf.reduce_mean(pairwise_improvement_bool)))
    metrics.append(tf.summary.histogram('training/improvement_pairwise_hist', pairwise_improvement_bool))
    self.eval_summs = tf.summary.merge(metrics)


  def _build_embedding_saver(self, sess):
    """To use embedding visualizer data has to be stored in variable
