From 2fc7fc7a18fb8cbb78d380caf51947097138597c Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Tue, 10 Oct 2017 05:33:11 +0000 Subject: [PATCH] pass multiple forward backward --- paddle/framework/executor_test.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paddle/framework/executor_test.cc b/paddle/framework/executor_test.cc index 9f8a6f8593d..259205f7c1d 100644 --- a/paddle/framework/executor_test.cc +++ b/paddle/framework/executor_test.cc @@ -279,8 +279,10 @@ TEST_F(ExecutorTesterRandom, GPU) { std::unique_ptr executor(new Executor(places)); executor->Run(init_pdesc_, GetGlobalScope(), 0); - executor->Run(pdesc_, GetGlobalScope(), 0); - std::vector> result = GetFetchVariable(); + for (int batch_id = 0; batch_id < 3; batch_id++) { + executor->Run(pdesc_, GetGlobalScope(), 0); + std::vector> result = GetFetchVariable(); + } } TEST_F(ExecutorTesterFeedAndFetch, GPU) { -- GitLab