code: def softmax_summaries(loss, logits, one_hot_labels, name="softmax"):
      """Create the softmax summaries for this cross entropy loss.
  
      Args:
        loss: Cross-entropy loss.
        logits: The [batch_size, classes] float tensor representing the logits.
        one_hot_labels: The float tensor representing actual class ids. If this is
          [batch_size, classes], then we take the argmax of it first.
        name: Prepended to summary scope.
      """
      tf.summary.scalar(name + "_loss", loss)
  
      one_hot_labels = tf.cond(
          tf.equal(tf.rank(one_hot_labels), 2),
          lambda: tf.to_int32(tf.argmax(one_hot_labels, 1)),
          lambda: tf.to_int32(one_hot_labels),
      )
  
      in_top_1 = tf.nn.in_top_k(logits, one_hot_labels, 1)
      tf.summary.scalar(
          name + "_precision@1", tf.reduce_mean(tf.to_float(in_top_1))
      )
      in_top_5 = tf.nn.in_top_k(logits, one_hot_labels, 5)
      tf.summary.scalar(
          name + "_precision@5", tf.reduce_mean(tf.to_float(in_top_5))
      )
  
imports: import importlib
  import os
  import librosa
  import numpy
  import tensorflow.compat.v1
  import tf_slim
label_desc: Use image node_id 21 for calling a global function with example usage: softmax_summaries(loss, logits, one_hot_labels, name) without return types