未验证 提交 4474fc10 编写于 作者: W Wilber 提交者: GitHub

fix compile on windows. test=develop (#25310)

上级 ed262b80
......@@ -47,8 +47,8 @@ int test_main(const AnalysisConfig& config, Barrier* barrier = nullptr) {
std::vector<PaddleTensor> outputs;
predictor->Run(inputs, &outputs);
const std::vector<float> truth_values = {
-0.00621776, -0.00620937, 0.00990623, -0.0039817, -0.00074315,
0.61229795, -0.00491806, -0.00068755, 0.18409646, 0.30090684};
-0.00621776f, -0.00620937f, 0.00990623f, -0.0039817f, -0.00074315f,
0.61229795f, -0.00491806f, -0.00068755f, 0.18409646f, 0.30090684f};
const size_t expected_size = 1;
EXPECT_EQ(outputs.size(), expected_size);
float* data_o = static_cast<float*>(outputs[0].data.data());
......
......@@ -49,15 +49,17 @@ TEST(AnalysisPredictor, use_gpu) {
ASSERT_TRUE(predictor->Run(inputs, &outputs));
const std::vector<float> truth_values = {
127.780396, 738.16656, 1013.2264, -438.17206, 366.4022, 927.66187,
736.2241, -633.68567, -329.92737, -430.15637, -633.0639, -146.54858,
-1324.2804, -1349.3661, -242.67671, 117.44864, -801.7251, -391.51495,
-404.8202, 454.16132, 515.48206, -133.03114, 69.293076, 590.09753,
-1434.6917, -1070.8903, 307.0744, 400.52573, -316.12177, -587.1265,
-161.05742, 800.3663, -96.47157, 748.708, 868.17645, -447.9403,
112.73656, 1127.1992, 47.43518, 677.7219, 593.1881, -336.4011,
551.3634, 397.82474, 78.39835, -715.4006, 405.96988, 404.25684,
246.01978, -8.430191, 131.36617, -648.0528};
127.780396f, 738.16656f, 1013.2264f, -438.17206f, 366.4022f,
927.66187f, 736.2241f, -633.68567f, -329.92737f, -430.15637f,
-633.0639f, -146.54858f, -1324.2804f, -1349.3661f, -242.67671f,
117.44864f, -801.7251f, -391.51495f, -404.8202f, 454.16132f,
515.48206f, -133.03114f, 69.293076f, 590.09753f, -1434.6917f,
-1070.8903f, 307.0744f, 400.52573f, -316.12177f, -587.1265f,
-161.05742f, 800.3663f, -96.47157f, 748.708f, 868.17645f,
-447.9403f, 112.73656f, 1127.1992f, 47.43518f, 677.7219f,
593.1881f, -336.4011f, 551.3634f, 397.82474f, 78.39835f,
-715.4006f, 405.96988f, 404.25684f, 246.01978f, -8.430191f,
131.36617f, -648.0528f};
const size_t expected_size = 1;
EXPECT_EQ(outputs.size(), expected_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册