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 an optimizer of this attack.
  
  :return: Attack optimizer.
docstr_tok: ["Create","an","optimizer","of","this","attack",".",":","return",":","Attack","optimizer","."]
code: def _create_optimizer(self) -> "Optimizer":
      """
      Create an optimizer of this attack.
  
      :return: Attack optimizer.
      """
      import tensorflow as tf
  
      # Create placeholder for learning rate
      learning_rate = tf.placeholder(
          dtype=tf.float32, shape=[], name="learning_rate"
      )
  
      # Create placeholder for momentum
      if self.optimizer in ["RMSPropOptimizer", "MomentumOptimizer"]:
          momentum = tf.placeholder(
              dtype=tf.float32, shape=[], name="momentum"
          )
  
      # Create placeholder for decay
      if self.optimizer == "RMSPropOptimizer":
          decay = tf.placeholder(
              dtype=tf.float32, shape=[], name="decay"
          )
  
      # Create optimizer
      if self.optimizer == "GradientDescentOptimizer":
          optimizer = tf.train.GradientDescentOptimizer(
              learning_rate=learning_rate
          )  # pragma: no cover
      elif self.optimizer == "MomentumOptimizer":
          optimizer = tf.train.MomentumOptimizer(
              learning_rate=learning_rate, momentum=momentum
          )
      elif self.optimizer == "RMSPropOptimizer":
          optimizer = tf.train.RMSPropOptimizer(
              learning_rate=learning_rate,
              momentum=momentum,
              decay=decay,
          )
      elif self.optimizer == "AdamOptimizer":  # pragma: no cover
          optimizer = tf.train.AdamOptimizer(
              learning_rate=learning_rate
          )
      else:
          raise NotImplementedError("Unknown optimizer.")
  
      return optimizer
  
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 5 for calling the ShapeShifter obj's underlying member method code with example usage: obj._create_optimizer() and returns: optimizer