code: def dmol_neg_log_perplexity(predictions,
                              labels,
                              weights_fn=None):
    
    del weights_fn  # Unused
    num, den = common_layers.dml_loss(
        predictions, labels, reduce_sum=False)
    return (-num, den)
docs: Average log-perplexity excluding padding 0s. No smoothing.