def _create_similarity_loss(initial_input: "Tensor", current_value: "Tensor") -> "Tensor":
        """
        Create the partial loss tensor of this attack from the similarity loss.

        :param initial_input: Initial input.
        :param current_value: Current image/texture.
        :return: Attack partial loss tensor.
        """
        import tensorflow as tf

        # Create a placeholder for the similarity weight
        similarity_weight = tf.placeholder(dtype=tf.float32, shape=[], name="similarity_weight")

        # Compute similarity loss
        similarity_loss = tf.nn.l2_loss(initial_input - current_value)
        weight_similarity_loss = tf.multiply(x=similarity_loss, y=similarity_weight, name="weight_similarity_loss")

        return weight_similarity_loss

        Create the partial loss tensor of this attack from the similarity loss.

        :param initial_input: Initial input.
        :param current_value: Current image/texture.
        :return: Attack partial loss tensor.
        
art/attacks/evasion/shapeshifter.py