Commit 051338be authored by Khalique's avatar Khalique
Browse files

remove std::vector

parent ca15d48a
......@@ -166,7 +166,7 @@ void globalavgpool_test()
auto s = migraph::shape{migraph::shape::float_type, {1, 3, 2, 2}};
auto op = migraph::op::pooling{"average"};
auto lens = s.lens();
op.lengths = std::vector<std::size_t>{lens[2], lens[3]};
op.lengths = {lens[2], lens[3]};
std::vector<float> data{0.3, 0.2, 0.4, 0.1, 0.8, 0.5, 0.9, 0.1, 0.1, 0.7, 0.1, 0.6};
auto l0 = p.add_literal(migraph::literal{s, data});
......@@ -186,7 +186,7 @@ void globalmaxpool_test()
auto s = migraph::shape{migraph::shape::float_type, {1, 3, 2, 2}};
auto op = migraph::op::pooling{"max"};
auto lens = s.lens();
op.lengths = std::vector<std::size_t>{lens[2], lens[3]};
op.lengths = {lens[2], lens[3]};
std::vector<float> data{0.3, 0.2, 0.4, 0.1, 0.8, 0.5, 0.9, 0.1, 0.1, 0.7, 0.1, 0.6};
auto l0 = p.add_literal(migraph::literal{s, data});
......
......@@ -460,7 +460,7 @@ struct test_global_avg_pooling
p.add_parameter("x", migraph::shape{migraph::shape::float_type, {1, 3, 16, 16}});
auto op = migraph::op::pooling{"average"};
auto lens = input->get_shape().lens();
op.lengths = std::vector<std::size_t>{lens[2], lens[3]};
op.lengths = {lens[2], lens[3]};
p.add_instruction(op, input);
return p;
}
......@@ -475,7 +475,7 @@ struct test_global_max_pooling
p.add_parameter("x", migraph::shape{migraph::shape::float_type, {1, 3, 16, 16}});
auto op = migraph::op::pooling{"max"};
auto lens = input->get_shape().lens();
op.lengths = std::vector<std::size_t>{lens[2], lens[3]};
op.lengths = {lens[2], lens[3]};
p.add_instruction(op, input);
return p;
}
......
......@@ -124,7 +124,7 @@ void globalavgpool_test()
auto input = p.add_parameter("0", migraph::shape{migraph::shape::float_type, {1, 3, 16, 16}});
auto op = migraph::op::pooling{"average"};
auto lens = input->get_shape().lens();
op.lengths = std::vector<std::size_t>{lens[2], lens[3]};
op.lengths = {lens[2], lens[3]};
p.add_instruction(op, input);
auto prog = migraph::parse_onnx("globalavgpool_test.onnx");
......@@ -138,7 +138,7 @@ void globalmaxpool_test()
auto input = p.add_parameter("0", migraph::shape{migraph::shape::float_type, {1, 3, 16, 16}});
auto op = migraph::op::pooling{"max"};
auto lens = input->get_shape().lens();
op.lengths = std::vector<std::size_t>{lens[2], lens[3]};
op.lengths = {lens[2], lens[3]};
p.add_instruction(op, input);
auto prog = migraph::parse_onnx("globalmaxpool_test.onnx");
......
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