From 5b197f4be15d1e8555fc48d3259e6d5e9eca125f Mon Sep 17 00:00:00 2001 From: zp7 <9678873+ForceDaryl@users.noreply.github.com> Date: Tue, 11 Jun 2019 19:06:56 +0800 Subject: [PATCH] fix test_yolo crash when use offical model (#1684) --- test/net/test_yolo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/net/test_yolo.cpp b/test/net/test_yolo.cpp index 700eb10cac..40aabe92f1 100644 --- a/test/net/test_yolo.cpp +++ b/test/net/test_yolo.cpp @@ -22,9 +22,10 @@ int main() { // ../../../test/models/googlenet // ../../../test/models/mobilenet auto time1 = time(); - if (paddle_mobile.Load(g_yolo, true)) { + if (paddle_mobile.Load(std::string(g_yolo) + "/model", + std::string(g_yolo) + "/params", true)) { auto time2 = time(); - std::cout << "load cost :" << time_diff(time1, time1) << "ms" << std::endl; + std::cout << "load cost :" << time_diff(time1, time2) << "ms" << std::endl; std::vector dims{1, 3, 227, 227}; Tensor input_tensor; -- GitLab