We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1b676be + 8e0fe03 commit f351cebCopy full SHA for f351ceb
paddle/fluid/inference/tests/api/analyzer_ner_tester.cc
@@ -144,8 +144,9 @@ void TestChineseNERPrediction(bool use_analysis) {
144
size_t num_samples;
145
for (int i = 0; i < FLAGS_repeat; i++) {
146
DataRecord data(FLAGS_infer_data, FLAGS_batch_size);
147
+ // Just one batch, the num_samples remains the same.
148
num_samples = data.num_samples;
- for (size_t bid = 0; bid < num_samples; ++bid) {
149
+ for (size_t bid = 0; bid < num_samples / FLAGS_batch_size; ++bid) {
150
PrepareInputs(&input_slots, &data, FLAGS_batch_size);
151
timer.tic();
152
predictor->Run(input_slots, &outputs);
0 commit comments