import tensorflow as tf

            channel_2: output of second channel (i.e. branch_2),
                              tensor of size [batch_size, 192]
            label: Tensor of shape [batch_size]
            margin: Margin of the contrastive loss

        Returns:
            loss: scalar float Tensor
        """
        ########################
        # PUT YOUR CODE HERE  #
        ########################
        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)
        loss = label*(D**2) + (1-label) * (tf.reduce_max([zeros, margin - D**2], 0))
        ########################
        # END OF YOUR CODE    #
        ########################

        return loss
