class_docstr: Implementation of the ShapeShifter attack. This is a robust physical adversarial attack on Faster R-CNN object
  detector and is developed in TensorFlow.
  
  | Paper link: https://arxiv.org/abs/1804.05810
class_docstr_tok: ["Implementation","of","the","ShapeShifter","attack",".","This","is","a","robust","physical","adversarial","attack","on","Faster","R-CNN","object","detector","and","is","developed","in","TensorFlow",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1804.05810"]
docstr: 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.
docstr_tok: ["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","."]
code: 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
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/shapeshifter.py
imports: import logging
  from typing import List, Dict, Optional, Tuple, TYPE_CHECKING
  import numpy
  from art.attacks.attack import EvasionAttack
  from art.estimators.object_detection.tensorflow_faster_rcnn import TensorFlowFasterRCNN
label_desc: Use image node_id 10 for calling the ShapeShifter obj's underlying member method code with example usage: obj._create_similarity_loss(initial_input, current_value) and returns: weight_similarity_loss