Skip to content

Commit

Permalink
fixed predict mode APIs miss-usages
Browse files Browse the repository at this point in the history
  • Loading branch information
aijunbai committed Nov 7, 2018
1 parent b443ca9 commit ee24fa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ def main(_):
if FLAGS.do_predict:
predict_examples = processor.get_test_examples(FLAGS.data_dir)
predict_file = os.path.join(FLAGS.output_dir, "predict.tf_record")
convert_examples_to_features(predict_examples, label_list,
file_based_convert_examples_to_features(predict_examples, label_list,
FLAGS.max_seq_length, tokenizer, predict_file)

tf.logging.info("***** Running prediction*****")
Expand All @@ -871,7 +871,7 @@ def main(_):
raise ValueError('Prediction in TPU not supported')

predict_drop_remainder = True if FLAGS.use_tpu else False
predict_input_fn = input_fn_builder(
predict_input_fn = file_based_input_fn_builder(
input_file=predict_file,
seq_length=FLAGS.max_seq_length,
is_training=False,
Expand Down

0 comments on commit ee24fa5

Please sign in to comment.