Merge pull request #13345 from Superjomn/bugfix/lac_test

fix ner_test when bs>1
fix-develop-build.sh
Tao Luo 7 years ago committed by GitHub
commit f351ceb65a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -144,8 +144,9 @@ void TestChineseNERPrediction(bool use_analysis) {
size_t num_samples;
for (int i = 0; i < FLAGS_repeat; i++) {
DataRecord data(FLAGS_infer_data, FLAGS_batch_size);
// Just one batch, the num_samples remains the same.
num_samples = data.num_samples;
for (size_t bid = 0; bid < num_samples; ++bid) {
for (size_t bid = 0; bid < num_samples / FLAGS_batch_size; ++bid) {
PrepareInputs(&input_slots, &data, FLAGS_batch_size);
timer.tic();
predictor->Run(input_slots, &outputs);

Loading…
Cancel
Save