6 #include <boost/test/unit_test.hpp> 8 #include "../Deserializer.hpp" 17 explicit GatherFixture(
const std::string &inputShape,
18 const std::string &indicesShape,
19 const std::string &input1Content,
20 const std::string &outputShape,
21 const std::string dataType,
22 const std::string constDataType)
30 layer_type: "InputLayer", 36 layerName: "InputLayer", 40 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 45 dimensions: )" + inputShape + R"(, 46 dataType: )" + dataType + R"( 51 layer_type: "ConstantLayer", 55 layerName: "ConstantLayer", 56 layerType: "Constant", 60 dimensions: )" + indicesShape + R"(, 67 dimensions: )" + indicesShape + R"(, 68 dataType: )" + dataType + R"( 70 data_type: )" + constDataType + R"(, 72 data: )" + input1Content + R"(, 76 layer_type: "GatherLayer", 80 layerName: "GatherLayer", 85 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 89 connection: {sourceLayerIndex:1, outputSlotIndex:0 } 94 dimensions: )" + outputShape + R"(, 95 dataType: )" + dataType + R"( 100 layer_type: "OutputLayer", 106 layerName: "OutputLayer", 110 connection: {sourceLayerIndex:2, outputSlotIndex:0 }, 115 dimensions: )" + outputShape + R"(, 116 dataType: )" + dataType + R"( 127 struct SimpleGatherFixtureFloat32 : GatherFixture
129 SimpleGatherFixtureFloat32() : GatherFixture(
"[ 3, 2, 3 ]",
"[ 2, 3 ]",
"[1, 2, 1, 2, 1, 0]",
130 "[ 2, 3, 2, 3 ]",
"Float32",
"IntData") {}
135 RunTest<4, armnn::DataType::Float32>(0,
136 {{
"InputLayer", { 1, 2, 3,
142 {{
"OutputLayer", { 7, 8, 9,
BOOST_FIXTURE_TEST_CASE(GatherFloat32, SimpleGatherFixtureFloat32)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)