code: def logsoftmax(x):
      """Softmax where the inputs are logits and the outputs remain logits."""
      xdev = x - tf.reduce_max(x, 1, keep_dims=True)
      lsm = xdev - tf.log(
          tf.reduce_sum(tf.exp(xdev), 1, keep_dims=True)
      )
      return lsm
  
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 4 for calling a global function with example usage: logsoftmax(x) and returns: lsm