'Creates the metric op'

def create_metric_ops(self, _inputs, labels, predictions):

    loss_mask = tf.sequence_mask(lengths=tf.to_int32((labels[u'target_len'] - 1)), maxlen=tf.to_int32(tf.shape(predictions[u'losses'])[1]))
    return metrics.streaming_mean(predictions[u'losses'], loss_mask)
