code: def compute_accuracy(label, feature1, feature2):
      eucd = tf.sqrt(tf.reduce_sum((feature1 - feature2) ** 2, axis=1))
      pred = tf.cast(eucd < 0.5, label.dtype)
      return tf.reduce_mean(tf.cast(tf.equal(pred, label), tf.float32))
  
file_path: TensorLayer/examples/basic_tutorials/tutorial_mnist_siamese.py
imports: import random
  import time
  import numpy
  import tensorflow
  import tensorlayer
  from tensorlayer.layers import Dense, Dropout, Flatten, Input
  from tensorlayer.models import Model
label_desc: Use image node_id 2 for calling a global function with example usage: compute_accuracy(label, feature1, feature2) and returns: tf