import tensorflow as tf

        ########################
        D = (tf.reduce_sum((channel_1 - channel_2)**2, reduction_indices=1))**0.5
        zeros = tf.fill(tf.shape(D), 0.0)
        # loss = 0.5*(label*(D**2.) + (1-label) * (tf.reduce_max([zeros, margin - D], reduction_indices=0))**2)
