diff --git a/test/net/test_googlenet.cpp b/test/net/test_googlenet.cpp index c88a78974c330ec270fbcb3f5c28e368ef16440e..b489f33bab364bebdc81c87a7b6c200082f3e079 100644 --- a/test/net/test_googlenet.cpp +++ b/test/net/test_googlenet.cpp @@ -26,7 +26,7 @@ int main() { #endif paddle_mobile.SetThreadNum(1); - bool optimize = false; + bool optimize = true; auto time1 = time(); if (paddle_mobile.Load(g_googlenet, optimize)) { auto time2 = time(); @@ -35,10 +35,10 @@ int main() { std::vector output; std::vector dims{1, 3, 224, 224}; GetInput(g_test_image_1x3x224x224, &input, dims); - // // 预热十次 - // for (int i = 0; i < 10; ++i) { - // output = paddle_mobile.Predict(input, dims); - // } + // 预热十次 + for (int i = 0; i < 10; ++i) { + output = paddle_mobile.Predict(input, dims); + } auto time3 = time(); for (int i = 0; i < 10; ++i) { output = paddle_mobile.Predict(input, dims); @@ -47,9 +47,6 @@ int main() { std::cout << "predict cost :" << time_diff(time3, time4) / 10 << "ms" << std::endl; - for (int i = 0; i < output.size(); ++i) { - DLOG << "result[" << i << "] = " << output[i]; - } } return 0; }