bert_max_doc_str_max_str_pos_clean_doc_noise_doc/run_doc_qa.py
def group_answer_span_prob(ans_span_probs, group_ids):
                """Sums all answer span probilities from the same group."""
                delta = self.max_num_answer_strings + 1

                group_ans_probs = tf.math.unsorted_segment_sum(
                    tf.reshape(ans_span_probs, [-1]),
                    tf.reshape(group_ids, [-1]),
                    delta
                )

                return tf.reshape(
                    group_ans_probs, [1, delta]
                )
Sums all answer span probilities from the same group.
Sums all answer span probilities from the same group.
Sums all answer span probilities from the same group .
def group_answer_span_prob(ans_span_probs, group_ids):
                delta = self.max_num_answer_strings + 1
                group_ans_probs = tf.math.unsorted_segment_sum(
                    tf.reshape(ans_span_probs, [-1]),
                    tf.reshape(group_ids, [-1]),
                    delta
                )
                return tf.reshape(
                    group_ans_probs, [1, delta]
                )
def group_answer_span_prob ( ans_span_probs , group_ids ) : delta = self . max_num_answer_strings + 1 group_ans_probs = tf . math . unsorted_segment_sum ( tf . reshape ( ans_span_probs , [ - 1 ] ) , tf . reshape ( group_ids , [ - 1 ] ) , delta ) return tf . reshape ( group_ans_probs , [ 1 , delta ] )
Sums all answer span probilities from the same group.
Sums all answer span probilities from the same group .
"""Sums all answer span probilities from the same group."""
ans_span_probs
group_ids