diff --git a/paddle/framework/executor_test.cc b/paddle/framework/executor_test.cc index 9f8a6f8593d6a022faeba32fabfbc2aeed12c928..259205f7c1ddaeca0b1537956966a9ef5b83c44b 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) {