def rouge_l_fscore(predictions, labels):
    'ROUGE scores computation between labels and predictions.\n\n  This is an approximate ROUGE scoring method since we do not glue word pieces\n  or decode the ids and tokenize the output.\n\n  Args:\n    predictions: tensor, model predictions\n    labels: tensor, gold output.\n\n  Returns:\n    rouge_l_fscore: approx rouge-l f1 score.\n  '
    outputs = tf.to_int32(tf.argmax(predictions, axis=(- 1)))
    rouge_l_f_score = tf.py_func(rouge_l_sentence_level, (outputs, labels), tf.float32)
    return (rouge_l_f_score, tf.constant(1.0))
ROUGE scores computation between labels and predictions.

This is an approximate ROUGE scoring method since we do not glue word pieces
or decode the ids and tokenize the output.

Args:
  predictions: tensor, model predictions
  labels: tensor, gold output.

Returns:
  rouge_l_fscore: approx rouge-l f1 score.
def rouge_l_fscore(predictions, labels):
    'ROUGE scores computation between labels and predictions.\n\n  This is an approximate ROUGE scoring method since we do not glue word pieces\n  or decode the ids and tokenize the output.\n\n  Args:\n    predictions: tensor, model predictions\n    labels: tensor, gold output.\n\n  Returns:\n    rouge_l_fscore: approx rouge-l f1 score.\n  '
    outputs = tf.to_int32(tf.argmax(predictions, axis=(- 1)))
    rouge_l_f_score = tf.py_func(rouge_l_sentence_level, (outputs, labels), tf.float32)
    return (rouge_l_f_score, tf.constant(1.0))