code: def entropy_y_x(logits, mask):
      """Entropy term to add to VAT with entropy minimization.
  
      Args:
        logits: A Tensor containing the predicted logits for a batch of samples.
        mask: A boolean Tensor specifying which samples to use in the calculation of
          the entropy.
  
      Returns:
        The entropy minimization loss.
      """
      mask = tf.cast(mask, dtype=tf.float32)
      p = tf.nn.softmax(logits)
      ent = tf.reduce_sum(p * logsoftmax(logits), 1)
      ent = tf.reduce_sum(tf.multiply(ent, mask)) / tf.reduce_sum(mask)
      return -ent
  
file_path: neural-structured-learning/research/gam/gam/trainer/adversarial_sparse.py
imports: from .adversarial_dense import get_normalized_vector
  from .adversarial_dense import get_normalizing_constant
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: entropy_y_x(logits, mask) and returns: unknown