15 UnsqueezeFixture(
const std::vector<int>& axes,
16 const std::vector<int>& inputShape,
17 const std::vector<int>& outputShape)
21 producer_name: "onnx-example" 56 struct UnsqueezeSingleAxesFixture : UnsqueezeFixture
58 UnsqueezeSingleAxesFixture() : UnsqueezeFixture({ 0 }, { 2, 3 }, { 1, 2, 3 })
64 struct UnsqueezeMultiAxesFixture : UnsqueezeFixture
66 UnsqueezeMultiAxesFixture() : UnsqueezeFixture({ 1, 3 }, { 3, 2, 5 }, { 3, 1, 2, 1, 5 })
72 struct UnsqueezeUnsortedAxesFixture : UnsqueezeFixture
74 UnsqueezeUnsortedAxesFixture() : UnsqueezeFixture({ 3, 0, 1 }, { 2, 5 }, { 1, 1, 2, 1, 5 })
80 struct UnsqueezeScalarFixture : UnsqueezeFixture
82 UnsqueezeScalarFixture() : UnsqueezeFixture({ 0 }, { }, { 1 })
90 RunTest<3, float>({{
"Input", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f }}},
91 {{
"Output", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f }}});
96 RunTest<5, float>({{
"Input", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
97 6.0f, 7.0f, 8.0f, 9.0f, 10.0f,
98 11.0f, 12.0f, 13.0f, 14.0f, 15.0f,
99 16.0f, 17.0f, 18.0f, 19.0f, 20.0f,
100 21.0f, 22.0f, 23.0f, 24.0f, 25.0f,
101 26.0f, 27.0f, 28.0f, 29.0f, 30.0f }}},
102 {{
"Output", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
103 6.0f, 7.0f, 8.0f, 9.0f, 10.0f,
104 11.0f, 12.0f, 13.0f, 14.0f, 15.0f,
105 16.0f, 17.0f, 18.0f, 19.0f, 20.0f,
106 21.0f, 22.0f, 23.0f, 24.0f, 25.0f,
107 26.0f, 27.0f, 28.0f, 29.0f, 30.0f }}});
112 RunTest<5, float>({{
"Input", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
113 6.0f, 7.0f, 8.0f, 9.0f, 10.0f }}},
114 {{
"Output", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
115 6.0f, 7.0f, 8.0f, 9.0f, 10.0f }}});
120 RunTest<1, float>({{
"Input", { 1.0f }}},
121 {{
"Output", { 1.0f }}});
126 UnsqueezeInputAxesFixture()
130 producer_name: "onnx-example" 197 RunTest<5, float>({{
"Input", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
198 6.0f, 7.0f, 8.0f, 9.0f, 10.0f,
199 11.0f, 12.0f, 13.0f, 14.0f, 15.0f,
200 16.0f, 17.0f, 18.0f, 19.0f, 20.0f,
201 21.0f, 22.0f, 23.0f, 24.0f, 25.0f,
202 26.0f, 27.0f, 28.0f, 29.0f, 30.0f }}},
203 {{
"Output", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
204 6.0f, 7.0f, 8.0f, 9.0f, 10.0f,
205 11.0f, 12.0f, 13.0f, 14.0f, 15.0f,
206 16.0f, 17.0f, 18.0f, 19.0f, 20.0f,
207 21.0f, 22.0f, 23.0f, 24.0f, 25.0f,
208 26.0f, 27.0f, 28.0f, 29.0f, 30.0f }}});
std::string ConstructTensorShapeString(const std::vector< int > &shape)
std::string ConstructIntsAttribute(const std::string &name, const std::vector< int > &values)
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
TEST_SUITE("OnnxParser_Unsqueeze")