diff --git a/paddle/fluid/inference/tests/api/lite_resnet50_test.cc b/paddle/fluid/inference/tests/api/lite_resnet50_test.cc index da5f0b0dea0d835c0eb122c318fb8e0382d090d7..d68065553a9cffbade16189d54c004f72100ed55 100644 --- a/paddle/fluid/inference/tests/api/lite_resnet50_test.cc +++ b/paddle/fluid/inference/tests/api/lite_resnet50_test.cc @@ -50,14 +50,15 @@ TEST(AnalysisPredictor, use_gpu) { ASSERT_TRUE(predictor->Run(inputs, &outputs)); const std::vector truth_values = { - 127.779, 738.165, 1013.22, -438.17, 366.401, 927.659, 736.222, - -633.684, -329.927, -430.155, -633.062, -146.548, -1324.28, -1349.36, - -242.675, 117.448, -801.723, -391.514, -404.818, 454.16, 515.48, - -133.031, 69.293, 590.096, -1434.69, -1070.89, 307.074, 400.525, - -316.12, -587.125, -161.056, 800.363, -96.4708, 748.706, 868.174, - -447.938, 112.737, 1127.2, 47.4355, 677.72, 593.186, -336.4, - 551.362, 397.823, 78.3979, -715.398, 405.969, 404.256, 246.019, - -8.42969, 131.365, -648.051}; + 127.779f, 738.165f, 1013.22f, -438.17f, 366.401f, 927.659f, + 736.222f, -633.684f, -329.927f, -430.155f, -633.062f, -146.548f, + -1324.28f, -1349.36f, -242.675f, 117.448f, -801.723f, -391.514f, + -404.818f, 454.16f, 515.48f, -133.031f, 69.293f, 590.096f, + -1434.69f, -1070.89f, 307.074f, 400.525f, -316.12f, -587.125f, + -161.056f, 800.363f, -96.4708f, 748.706f, 868.174f, -447.938f, + 112.737f, 1127.2f, 47.4355f, 677.72f, 593.186f, -336.4f, + 551.362f, 397.823f, 78.3979f, -715.398f, 405.969f, 404.256f, + 246.019f, -8.42969f, 131.365f, -648.051f}; const size_t expected_size = 1; EXPECT_EQ(outputs.size(), expected_size); @@ -106,14 +107,15 @@ TEST(Predictor, use_gpu) { output_t->CopyToCpu(out_data.data()); const std::vector truth_values = { - 127.779, 738.165, 1013.22, -438.17, 366.401, 927.659, 736.222, - -633.684, -329.927, -430.155, -633.062, -146.548, -1324.28, -1349.36, - -242.675, 117.448, -801.723, -391.514, -404.818, 454.16, 515.48, - -133.031, 69.293, 590.096, -1434.69, -1070.89, 307.074, 400.525, - -316.12, -587.125, -161.056, 800.363, -96.4708, 748.706, 868.174, - -447.938, 112.737, 1127.2, 47.4355, 677.72, 593.186, -336.4, - 551.362, 397.823, 78.3979, -715.398, 405.969, 404.256, 246.019, - -8.42969, 131.365, -648.051}; + 127.779f, 738.165f, 1013.22f, -438.17f, 366.401f, 927.659f, + 736.222f, -633.684f, -329.927f, -430.155f, -633.062f, -146.548f, + -1324.28f, -1349.36f, -242.675f, 117.448f, -801.723f, -391.514f, + -404.818f, 454.16f, 515.48f, -133.031f, 69.293f, 590.096f, + -1434.69f, -1070.89f, 307.074f, 400.525f, -316.12f, -587.125f, + -161.056f, 800.363f, -96.4708f, 748.706f, 868.174f, -447.938f, + 112.737f, 1127.2f, 47.4355f, 677.72f, 593.186f, -336.4f, + 551.362f, 397.823f, 78.3979f, -715.398f, 405.969f, 404.256f, + 246.019f, -8.42969f, 131.365f, -648.051f}; float* data_o = out_data.data(); for (size_t j = 0; j < out_num; j += 10) {