2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // See LICENSE file in the project root for full license information.
6 #include <boost/test/unit_test.hpp>
7 #include "armnnOnnxParser/IOnnxParser.hpp"
8 #include "ParserPrototxtFixture.hpp"
10 BOOST_AUTO_TEST_SUITE(OnnxParser)
12 struct BatchNormalizationMainFixture : public armnnUtils::ParserPrototxtFixture<armnnOnnxParser::IOnnxParser>
14 BatchNormalizationMainFixture()
19 producer_version: "2.5.1"
106 op_type: "BatchNormalization"
167 BOOST_FIXTURE_TEST_CASE(ValidBatchNormalizationTest, BatchNormalizationMainFixture)
169 RunTest<4>({{"Input", {1, 2, 3, 4, 5, 6, 7, 8, 9}}}, // Input data.
170 {{"Output", {-2.8277204f, -2.12079024f, -1.4138602f,
171 -0.7069301f, 0.0f, 0.7069301f,
172 1.4138602f, 2.12079024f, 2.8277204f}}}); // Expected output data.
176 struct BatchNormalizationBisFixture : public armnnUtils::ParserPrototxtFixture<armnnOnnxParser::IOnnxParser>
178 BatchNormalizationBisFixture()
182 producer_name: "CNTK"
183 producer_version: "2.5.1"
270 op_type: "BatchNormalization"
335 BOOST_FIXTURE_TEST_CASE(ValidBatchNormalizationBisTest, BatchNormalizationBisFixture)
337 RunTest<4>({{"Input", {-1, 0.0, 1, 2, 3.0, 4.0}}}, // Input data.
338 {{"Output", {-0.999995f, 0.0, 0.999995f,
339 -0.22474074f, 1.0f, 2.2247407f}}}); // Expected output data.
342 BOOST_AUTO_TEST_SUITE_END()