From 708bec2e56c6a856f628ad8b650b0bf04a3df975 Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Thu, 31 May 2018 16:33:54 +0800 Subject: [PATCH] add test --- paddle/fluid/inference/tests/book/test_inference_nlp.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/paddle/fluid/inference/tests/book/test_inference_nlp.cc b/paddle/fluid/inference/tests/book/test_inference_nlp.cc index e216e9dbe6f..990d45964e3 100644 --- a/paddle/fluid/inference/tests/book/test_inference_nlp.cc +++ b/paddle/fluid/inference/tests/book/test_inference_nlp.cc @@ -200,6 +200,14 @@ TEST(inference, nlp) { LOG(INFO) << "Total infer time: " << (stop_ms - start_ms) / 1000.0 / 60 << " min, avg time per seq: " << (stop_ms - start_ms) / datasets.size() << " ms"; + { // just for test + auto* scope = new paddle::framework::Scope(); + paddle::framework::LoDTensor outtensor; + TestInference( + dirname, {&(datasets[0])}, {&outtensor}, FLAGS_repeat, model_combined, + false); + delete scope; + } } delete scope; } -- GitLab