Commit 39cdee0e authored by Robert Kimball's avatar Robert Kimball Committed by Scott Cyphers

update a few files to build on windows (#2974)

* update a few files to build on windows

* more fixes
parent 0c813cf2
......@@ -461,18 +461,18 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_chw_scalar_scale_2d)
test_case.add_input<float>({2.f});
test_case.add_expected_output<float>(data_shape,
{0.07844645,
0.15689291,
0.23533936,
0.31378582,
0.39223227,
0.47067872,
0.54912518,
0.62757163,
0.70601809,
0.78446454,
0.86291099,
0.94135745});
{0.07844645f,
0.15689291f,
0.23533936f,
0.31378582f,
0.39223227f,
0.47067872f,
0.54912518f,
0.62757163f,
0.70601809f,
0.78446454f,
0.86291099f,
0.94135745f});
test_case.run();
}
......@@ -498,10 +498,10 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_chw_w_scale)
test_case.add_input<float>({2.f, 3.f});
test_case.add_expected_output<float>(
data_shape, {0.02857143, 0.05714286, 0.08571429, 0.11428571, 0.14285714, 0.17142857,
0.2, 0.22857143, 0.25714286, 0.28571429, 0.31428571, 0.34285714,
0.55714286, 0.6, 0.64285714, 0.68571429, 0.72857143, 0.77142857,
0.81428571, 0.85714286, 0.9, 0.94285714, 0.98571429, 1.02857143});
data_shape, {0.02857143f, 0.05714286f, 0.08571429f, 0.11428571f, 0.14285714f, 0.17142857f,
0.2f, 0.22857143f, 0.25714286f, 0.28571429f, 0.31428571f, 0.34285714f,
0.55714286f, 0.6f, 0.64285714f, 0.68571429f, 0.72857143f, 0.77142857f,
0.81428571f, 0.85714286f, 0.9f, 0.94285714f, 0.98571429f, 1.02857143f});
test_case.run();
}
......@@ -528,10 +528,10 @@ NGRAPH_TEST(DISABLED_${BACKEND_NAME}, normalize_across_hw_w_scale)
test_case.add_input<float>({2.f, 3.f});
test_case.add_expected_output<float>(
data_shape, {0.07844646, 0.15689291, 0.23533936, 0.31378582, 0.39223227, 0.47067872,
0.5491252, 0.62757164, 0.7060181, 0.78446454, 0.862911, 0.94135743,
0.5982327, 0.64425063, 0.6902685, 0.7362864, 0.7823043, 0.8283222,
0.87434006, 0.920358, 0.9663758, 1.0123938, 1.0584116, 1.1044296});
data_shape, {0.07844646f, 0.15689291f, 0.23533936f, 0.31378582f, 0.39223227f, 0.47067872f,
0.5491252f, 0.62757164f, 0.7060181f, 0.78446454f, 0.862911f, 0.94135743f,
0.5982327f, 0.64425063f, 0.6902685f, 0.7362864f, 0.7823043f, 0.8283222f,
0.87434006f, 0.920358f, 0.9663758f, 1.0123938f, 1.0584116f, 1.1044296f});
test_case.run();
}
......
This diff is collapsed.
......@@ -1516,25 +1516,25 @@ TEST(cpu_test, max_pool_with_indices_bprop_2d_2channel_2image)
auto d = backend->create_tensor(element::f32, shape_i);
copy_data(d,
test::NDArray<float, 4>({{{{0.3, 0.3, 0.2}, // img 0 chan 0
{0.3, 0.3, 0.2},
{0.2, 0.1, 0.2},
{0.2, 0.2, 0.2}},
{{0.3, 0.3, 0.3}, // img 0 chan 1
{0.3, 0.3, 0.3},
{0.3, 0.1, 0.2},
{0.3, 0.1, 0.4}}},
{{{0.2, 0.2, 0.2}, // img 1 chan 0
{0.2, 0.2, 0.3},
{0.2, 0.3, 0.3},
{0.2, 0.3, 0.3}},
{{0.2, 0.2, 0.1}, // img 1 chan 1
{0.2, 0.2, 0.2},
{0.2, 0.2, 0.2},
{0.1, 0.1, 0.2}}}})
test::NDArray<float, 4>({{{{0.3f, 0.3f, 0.2f}, // img 0 chan 0
{0.3f, 0.3f, 0.2f},
{0.2f, 0.1f, 0.2f},
{0.2f, 0.2f, 0.2f}},
{{0.3f, 0.3f, 0.3f}, // img 0 chan 1
{0.3f, 0.3f, 0.3f},
{0.3f, 0.1f, 0.2f},
{0.3f, 0.1f, 0.4f}}},
{{{0.2f, 0.2f, 0.2f}, // img 1 chan 0
{0.2f, 0.2f, 0.3f},
{0.2f, 0.3f, 0.3f},
{0.2f, 0.3f, 0.3f}},
{{0.2f, 0.2f, 0.1f}, // img 1 chan 1
{0.2f, 0.2f, 0.2f},
{0.2f, 0.2f, 0.2f},
{0.1f, 0.1f, 0.2f}}}})
.get_vector());
auto result = backend->create_tensor(element::f32, shape_a);
......
......@@ -261,9 +261,9 @@ TEST(serialize, passthrough)
TEST(serialize, constant_infinity_nan)
{
vector<float> a_data{123, 456, INFINITY, -INFINITY, NAN};
vector<float> b_data{5, 5, 5, 5, 5, 5};
vector<float> c_data{0.05, 0.05, 0.05, 0.05, 0.05, 0.05001, 0.05};
vector<float> a_data{123.f, 456.f, INFINITY, -INFINITY, NAN};
vector<float> b_data{5.f, 5.f, 5.f, 5.f, 5.f, 5.f};
vector<float> c_data{0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0.05001f, 0.05f};
vector<int64_t> d_data{-100, -10, -1, 0, 50, 5000000000001};
auto A = make_shared<op::Constant>(element::f32, Shape{5}, a_data);
auto B = make_shared<op::Constant>(element::f32, Shape{6}, b_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment