提交 b233ed13 编写于 作者: Y yangyaming

Set FLAGS_use_gpu in test_DetectionOutput.

上级 65969dad
...@@ -65,9 +65,12 @@ void doOneDetectionOutputTest(MatrixPtr& inputLoc, ...@@ -65,9 +65,12 @@ void doOneDetectionOutputTest(MatrixPtr& inputLoc,
dataLayers[2]->getOutputValue()->copyFrom(*inputConf); dataLayers[2]->getOutputValue()->copyFrom(*inputConf);
// test layer initialize // test layer initialize
bool store_FLAGS_use_gpu = FLAGS_use_gpu;
FLAGS_use_gpu = use_gpu;
std::vector<ParameterPtr> parameters; std::vector<ParameterPtr> parameters;
LayerPtr detectionOutputLayer; LayerPtr detectionOutputLayer;
initTestLayer(configt, &layerMap, &parameters, &detectionOutputLayer); initTestLayer(configt, &layerMap, &parameters, &detectionOutputLayer);
FLAGS_use_gpu = store_FLAGS_use_gpu;
detectionOutputLayer->forward(PASS_GC); detectionOutputLayer->forward(PASS_GC);
checkMatrixEqual(detectionOutputLayer->getOutputValue(), result); checkMatrixEqual(detectionOutputLayer->getOutputValue(), result);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册