6 #include <boost/test/unit_test.hpp> 14 PoolingMainFixture(
const std::string& dataType,
const std::string& op)
19 producer_version: "2.5.1" 28 elem_type: )" + dataType + R"( 50 op_type: )" + op + R"( 101 struct MaxPoolValidFixture : PoolingMainFixture
103 MaxPoolValidFixture() : PoolingMainFixture(
"1",
"\"MaxPool\"") {
108 struct MaxPoolInvalidFixture : PoolingMainFixture
110 MaxPoolInvalidFixture() : PoolingMainFixture(
"10",
"\"MaxPool\"") { }
115 RunTest<4>({{
"Input", {1.0f, 2.0f, 3.0f, -4.0f}}}, {{
"Output", {3.0f}}});
118 struct AvgPoolValidFixture : PoolingMainFixture
120 AvgPoolValidFixture() : PoolingMainFixture(
"1",
"\"AveragePool\"") {
127 PoolingWithPadFixture()
131 producer_name: "CNTK" 132 producer_version: "2.5.1" 163 op_type: "AveragePool" 185 name: "count_include_pad" 222 RunTest<4>({{"Input", {1.0f, 2.0f, 3.0f, -4.0f}}}, {{
"Output", {0.5}}});
227 RunTest<4>({{
"Input", {1.0f, 2.0f, 3.0f, -4.0f}}}, {{
"Output", {1.0/8.0}}});
236 producer_name: "CNTK" 237 producer_version: "2.5.1" 268 op_type: "GlobalAveragePool" 302 RunTest<4>({{"Input", {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}}}, {{
"Output", {10/4.0, 26/4.0}}});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(ValidMaxPoolTest, MaxPoolValidFixture)
BOOST_AUTO_TEST_SUITE_END()