code: def padded_neg_log_perplexity(
      predictions, labels, weights_fn=common_layers.weights_nonzero
  ):
      """Average log-perplexity exluding padding 0s. No smoothing."""
      num, den = common_layers.padded_cross_entropy(
          predictions,
          labels,
          0.0,
          weights_fn=weights_fn,
          reduce_sum=False,
      )
      return (-num, den)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import six
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import bleu_hook
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import rouge
  from tensor2tensor.utils import sari_hook
  import tensorflow.compat.v1
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 15 for calling a global function with example usage: padded_neg_log_perplexity(predictions, labels, weights_fn) and returns: unknown,  den