提交 d4c7be55 编写于 作者: J jiweibo

fix error on windows.

上级 c33664c8
...@@ -50,14 +50,15 @@ TEST(AnalysisPredictor, use_gpu) { ...@@ -50,14 +50,15 @@ TEST(AnalysisPredictor, use_gpu) {
ASSERT_TRUE(predictor->Run(inputs, &outputs)); ASSERT_TRUE(predictor->Run(inputs, &outputs));
const std::vector<float> truth_values = { const std::vector<float> truth_values = {
127.779, 738.165, 1013.22, -438.17, 366.401, 927.659, 736.222, 127.779f, 738.165f, 1013.22f, -438.17f, 366.401f, 927.659f,
-633.684, -329.927, -430.155, -633.062, -146.548, -1324.28, -1349.36, 736.222f, -633.684f, -329.927f, -430.155f, -633.062f, -146.548f,
-242.675, 117.448, -801.723, -391.514, -404.818, 454.16, 515.48, -1324.28f, -1349.36f, -242.675f, 117.448f, -801.723f, -391.514f,
-133.031, 69.293, 590.096, -1434.69, -1070.89, 307.074, 400.525, -404.818f, 454.16f, 515.48f, -133.031f, 69.293f, 590.096f,
-316.12, -587.125, -161.056, 800.363, -96.4708, 748.706, 868.174, -1434.69f, -1070.89f, 307.074f, 400.525f, -316.12f, -587.125f,
-447.938, 112.737, 1127.2, 47.4355, 677.72, 593.186, -336.4, -161.056f, 800.363f, -96.4708f, 748.706f, 868.174f, -447.938f,
551.362, 397.823, 78.3979, -715.398, 405.969, 404.256, 246.019, 112.737f, 1127.2f, 47.4355f, 677.72f, 593.186f, -336.4f,
-8.42969, 131.365, -648.051}; 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; const size_t expected_size = 1;
EXPECT_EQ(outputs.size(), expected_size); EXPECT_EQ(outputs.size(), expected_size);
...@@ -106,14 +107,15 @@ TEST(Predictor, use_gpu) { ...@@ -106,14 +107,15 @@ TEST(Predictor, use_gpu) {
output_t->CopyToCpu(out_data.data()); output_t->CopyToCpu(out_data.data());
const std::vector<float> truth_values = { const std::vector<float> truth_values = {
127.779, 738.165, 1013.22, -438.17, 366.401, 927.659, 736.222, 127.779f, 738.165f, 1013.22f, -438.17f, 366.401f, 927.659f,
-633.684, -329.927, -430.155, -633.062, -146.548, -1324.28, -1349.36, 736.222f, -633.684f, -329.927f, -430.155f, -633.062f, -146.548f,
-242.675, 117.448, -801.723, -391.514, -404.818, 454.16, 515.48, -1324.28f, -1349.36f, -242.675f, 117.448f, -801.723f, -391.514f,
-133.031, 69.293, 590.096, -1434.69, -1070.89, 307.074, 400.525, -404.818f, 454.16f, 515.48f, -133.031f, 69.293f, 590.096f,
-316.12, -587.125, -161.056, 800.363, -96.4708, 748.706, 868.174, -1434.69f, -1070.89f, 307.074f, 400.525f, -316.12f, -587.125f,
-447.938, 112.737, 1127.2, 47.4355, 677.72, 593.186, -336.4, -161.056f, 800.363f, -96.4708f, 748.706f, 868.174f, -447.938f,
551.362, 397.823, 78.3979, -715.398, 405.969, 404.256, 246.019, 112.737f, 1127.2f, 47.4355f, 677.72f, 593.186f, -336.4f,
-8.42969, 131.365, -648.051}; 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(); float* data_o = out_data.data();
for (size_t j = 0; j < out_num; j += 10) { for (size_t j = 0; j < out_num; j += 10) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册