import tensorflow as tf

          reg_weights: a float32 tensor with shape [num_anchors] representing
            regression weights
        """

        reg_weights = tf.cast(match.matched_column_indicator(), tf.float32)

        matched_gt_indices = match.matched_row_indices()
        matched_label = tf.gather(groundtruth_labels, matched_gt_indices)
        matched_is_foreground = tf.cast(matched_label[:,0] <= 0, tf.float32)
        matched_anchor_indices = match.matched_column_indices()
        unmatched_ignored_anchor_indices=match.unmatched_or_ignored_column_indices()
        unmatched_ignored_reg_weights = tf.gather(reg_weights, unmatched_ignored_anchor_indices)
        reg_weights= tf.dynamic_stitch(
            [matched_anchor_indices, unmatched_ignored_anchor_indices],
