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

        Create an optimizer of this attack.

        :return: Attack optimizer.
        
art/attacks/evasion/shapeshifter.py