提交 92ac0da7 编写于 作者: xiebaiyuan's avatar xiebaiyuan

paddle mobile gpu unit test

上级 b980974f
...@@ -25,11 +25,11 @@ int main() { ...@@ -25,11 +25,11 @@ int main() {
paddle_mobile.SetCLPath("/data/local/tmp/bin"); paddle_mobile.SetCLPath("/data/local/tmp/bin");
#endif #endif
auto isok = paddle_mobile.Load( // auto isok = paddle_mobile.Load(
std::string(g_mobilenet_vision) + "/vision_mobilenet_model", // std::string(g_mobilenet_vision) + "/vision_mobilenet_model",
std::string(g_mobilenet_vision) + "/vision_mobilenet_params", true); // std::string(g_mobilenet_vision) + "/vision_mobilenet_params", true);
// auto isok = paddle_mobile.Load(std::string(g_mobilenet), true); auto isok = paddle_mobile.Load(std::string(g_mobilenet), true);
if (isok) { if (isok) {
auto time2 = paddle_mobile::time(); auto time2 = paddle_mobile::time();
std::cout << "load cost :" << paddle_mobile::time_diff(time1, time2) << "ms" std::cout << "load cost :" << paddle_mobile::time_diff(time1, time2) << "ms"
...@@ -37,8 +37,7 @@ int main() { ...@@ -37,8 +37,7 @@ int main() {
std::vector<float> input; std::vector<float> input;
std::vector<int64_t> dims{1, 3, 224, 224}; std::vector<int64_t> dims{1, 3, 224, 224};
GetInput<float>(g_test_image_1x3x224x224_vision_mobilenet_input, &input, GetInput<float>(g_test_image_1x3x224x224_banana, &input, dims);
dims);
std::vector<float> vec_result = paddle_mobile.Predict(input, dims); std::vector<float> vec_result = paddle_mobile.Predict(input, dims);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册