code: def acc(_logits, y_batch):
      # return np.mean(np.equal(np.argmax(_logits, 1), y_batch))
      return tf.reduce_mean(
          tf.cast(
              tf.equal(
                  tf.argmax(_logits, 1),
                  tf.convert_to_tensor(y_batch, tf.int64),
              ),
              tf.float32,
          ),
          name="accuracy",
      )
  
imports: import numpy
  import tensorflow
  import tensorlayer
label_desc: Use image node_id 1 for calling a global function with example usage: acc(_logits, y_batch) and returns: tf