code: def acc(y, y_):
      correct_prediction = tf.equal(
          tf.argmax(y, 1), tf.convert_to_tensor(y_, tf.int64)
      )
      return tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
  
imports: import tensorflow
  import tensorlayer
label_desc: Use image node_id 2 for calling a global function with example usage: acc(y, y_) and returns: tf