def _create_faster_rcnn_loss(self) -> "Tensor":
        """
        Create the partial loss tensor of this attack from losses of the object detector.

        :return: Attack partial loss tensor.
        """
        import tensorflow as tf

        # Compute RPN classifier loss
        rpn_classifier_weight = tf.placeholder(dtype=tf.float32, shape=[], name="rpn_classifier_weight")

        rpn_classifier_loss = self.estimator.losses["Loss/RPNLoss/objectness_loss"]
        weight_rpn_classifier_loss = tf.multiply(
            x=rpn_classifier_loss, y=rpn_classifier_weight, name="weight_rpn_classifier_loss"
        )

        # Compute RPN localizer loss
        rpn_localizer_weight = tf.placeholder(dtype=tf.float32, shape=[], name="rpn_localizer_weight")

        rpn_localizer_loss = self.estimator.losses["Loss/RPNLoss/localization_loss"]
        weight_rpn_localizer_loss = tf.multiply(
            x=rpn_localizer_loss, y=rpn_localizer_weight, name="weight_rpn_localizer_loss"
        )

        # Compute box classifier loss
        box_classifier_weight = tf.placeholder(dtype=tf.float32, shape=[], name="box_classifier_weight")

        box_classifier_loss = self.estimator.losses["Loss/BoxClassifierLoss/classification_loss"]
        weight_box_classifier_loss = tf.multiply(
            x=box_classifier_loss, y=box_classifier_weight, name="weight_box_classifier_loss"
        )

        # Compute box localizer loss
        box_localizer_weight = tf.placeholder(dtype=tf.float32, shape=[], name="box_localizer_weight")

        box_localizer_loss = self.estimator.losses["Loss/BoxClassifierLoss/localization_loss"]
        weight_box_localizer_loss = tf.multiply(
            x=box_localizer_loss, y=box_localizer_weight, name="weight_box_localizer_loss"
        )

        # Compute partial loss
        partial_loss = tf.add_n(
            [
                weight_rpn_classifier_loss,
                weight_rpn_localizer_loss,
                weight_box_classifier_loss,
                weight_box_localizer_loss,
            ],
            name="partial_faster_rcnn_loss",
        )

        return partial_loss

        Create the partial loss tensor of this attack from losses of the object detector.

        :return: Attack partial loss tensor.
        
art/attacks/evasion/shapeshifter.py