From b233ed135352de1260b644112f939938798048ec Mon Sep 17 00:00:00 2001 From: yangyaming Date: Mon, 19 Jun 2017 14:53:59 +0800 Subject: [PATCH] Set FLAGS_use_gpu in test_DetectionOutput. --- paddle/gserver/tests/test_DetectionOutput.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddle/gserver/tests/test_DetectionOutput.cpp b/paddle/gserver/tests/test_DetectionOutput.cpp index 8ec7a284502..af43dc51fad 100644 --- a/paddle/gserver/tests/test_DetectionOutput.cpp +++ b/paddle/gserver/tests/test_DetectionOutput.cpp @@ -65,9 +65,12 @@ void doOneDetectionOutputTest(MatrixPtr& inputLoc, dataLayers[2]->getOutputValue()->copyFrom(*inputConf); // test layer initialize + bool store_FLAGS_use_gpu = FLAGS_use_gpu; + FLAGS_use_gpu = use_gpu; std::vector parameters; LayerPtr detectionOutputLayer; initTestLayer(configt, &layerMap, ¶meters, &detectionOutputLayer); + FLAGS_use_gpu = store_FLAGS_use_gpu; detectionOutputLayer->forward(PASS_GC); checkMatrixEqual(detectionOutputLayer->getOutputValue(), result); } -- GitLab