import tensorflow as tf

            prediction_dict['class_predictions_with_background'], batch_cls_targets,
            weights=weights)

        loss_dict = {
            'localization_loss': tf.reduce_sum(location_losses),
            'classification_loss': tf.reduce_sum(cls_losses),
        }
        return loss_dict

    def restore_map(self, from_detection_checkpoint=True):
