bert_max_doc_str_max_str_pos_clean_doc_noise_doc/run_doc_qa.py
def prediction_generator(estimator, predict_input_fn):
    """Given the input fn and estimator, yields one result."""
    for cnt, result in enumerate(estimator.predict(
            predict_input_fn, yield_single_examples=True)):
        if cnt % 1000 == 0:
            tf.logging.info("Processing example: %d" % cnt)
        unique_id = int(result["unique_ids"])
        start_logits = [float(x) for x in result["start_logits"].flat]
        end_logits = [float(x) for x in result["end_logits"].flat]
        yield RawResult(unique_id=unique_id,
                        start_logits=start_logits,
                        end_logits=end_logits)
Given the input fn and estimator, yields one result.
Given the input fn and estimator, yields one result.
Given the input fn and estimator yields one result .
def prediction_generator(estimator, predict_input_fn):
    for cnt, result in enumerate(estimator.predict(
            predict_input_fn, yield_single_examples=True)):
        if cnt % 1000 == 0:
            tf.logging.info("Processing example: %d" % cnt)
        unique_id = int(result["unique_ids"])
        start_logits = [float(x) for x in result["start_logits"].flat]
        end_logits = [float(x) for x in result["end_logits"].flat]
        yield RawResult(unique_id=unique_id,
                        start_logits=start_logits,
                        end_logits=end_logits)
def prediction_generator ( estimator , predict_input_fn ) : for cnt , result in enumerate ( estimator . predict ( predict_input_fn , yield_single_examples = True ) ) : if cnt % 1000 == 0 : tf . logging . info ( "Processing example: %d" % cnt ) unique_id = int ( result [ "unique_ids" ] ) start_logits = [ float ( x ) for x in result [ "start_logits" ] . flat ] end_logits = [ float ( x ) for x in result [ "end_logits" ] . flat ] yield RawResult ( unique_id = unique_id , start_logits = start_logits , end_logits = end_logits )
Given the input fn and estimator, yields one result.
Given the input fn and estimator yields one result .
"""Given the input fn and estimator, yields one result."""
estimator
predict_input_fn