import tensorflow as tf

    ignored_matches = tf.logical_and(
        ignored_matches,
        tf.less(
            matched_iou, self._config_dict['foreground_iou_threshold']))

    background_indicator = tf.logical_or(negative_matches, ignored_matches)

    # re-assign negatively matched boxes to the background class.
    matched_gt_boxes = tf.where(
        tf.tile(tf.expand_dims(background_indicator, -1), [1, 1, 4]),
        tf.zeros_like(matched_gt_boxes),
        matched_gt_boxes)
    matched_gt_classes = tf.where(
        background_indicator,
        tf.zeros_like(matched_gt_classes),
        matched_gt_classes)
    matched_gt_indices = tf.where(
        background_indicator,
