def METHOD_NAME(self, ):
    rpn_loss, bbox_loss, mask_loss = self._forward()
    loss = {}
    loss.update(rpn_loss)
    loss.update(bbox_loss)
    if self.with_mask:
        loss.update(mask_loss)
    total_loss = paddle.add_n(list(loss.values()))
    loss.update({'loss': total_loss})
    return loss