提交 347655b9 编写于 作者: Z zhaojiaying01

update unit test and jni

上级 de913954
...@@ -33,9 +33,9 @@ int main() { ...@@ -33,9 +33,9 @@ int main() {
GetInput<float>(g_hand, &input, dims); GetInput<float>(g_hand, &input, dims);
// 预热一次 // 预热一次
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
auto output = paddle_mobile.Predict(input, dims); auto output = paddle_mobile.Predict(input, dims);
} }
auto time3 = time(); auto time3 = time();
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
auto output = paddle_mobile.Predict(input, dims); auto output = paddle_mobile.Predict(input, dims);
......
...@@ -39,9 +39,9 @@ int main() { ...@@ -39,9 +39,9 @@ int main() {
std::cout << " Max element is " << *biggest << " at position " std::cout << " Max element is " << *biggest << " at position "
<< std::distance(std::begin(vec_result), biggest) << std::endl; << std::distance(std::begin(vec_result), biggest) << std::endl;
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
auto vec_result = paddle_mobile.Predict(input, dims); auto vec_result = paddle_mobile.Predict(input, dims);
} }
auto time3 = time(); auto time3 = time();
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
auto vec_result = paddle_mobile.Predict(input, dims); auto vec_result = paddle_mobile.Predict(input, dims);
......
...@@ -33,9 +33,9 @@ int main() { ...@@ -33,9 +33,9 @@ int main() {
std::vector<float> input(input_tensor.data<float>(), std::vector<float> input(input_tensor.data<float>(),
input_tensor.data<float>() + input_tensor.numel()); input_tensor.data<float>() + input_tensor.numel());
// 预热一次 // 预热一次
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
paddle_mobile.Predict(input, dims); paddle_mobile.Predict(input, dims);
} }
auto time3 = time(); auto time3 = time();
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
paddle_mobile.Predict(input, dims); paddle_mobile.Predict(input, dims);
......
...@@ -34,9 +34,9 @@ int main() { ...@@ -34,9 +34,9 @@ int main() {
std::vector<float> input(input_tensor.data<float>(), std::vector<float> input(input_tensor.data<float>(),
input_tensor.data<float>() + input_tensor.numel()); input_tensor.data<float>() + input_tensor.numel());
// 预热一次 // 预热一次
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
paddle_mobile.Predict(input, dims); paddle_mobile.Predict(input, dims);
} }
auto time3 = time(); auto time3 = time();
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
paddle_mobile.Predict(input, dims); paddle_mobile.Predict(input, dims);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册