12 #include <boost/test/unit_test.hpp> 21 explicit CastFixture(
const std::string& inputShape,
22 const std::string& outputShape,
23 const std::string& inputDataType,
24 const std::string& outputDataType)
32 layer_type: "InputLayer", 38 layerName: "inputTensor", 42 connection: { sourceLayerIndex:0, outputSlotIndex:0 }, 47 dimensions: )" + inputShape + R"(, 48 dataType: )" + inputDataType + R"( 56 layer_type: "CastLayer", 60 layerName: "CastLayer", 64 connection: { sourceLayerIndex:0, outputSlotIndex:0 }, 69 dimensions: )" + outputShape + R"(, 70 dataType: )" + outputDataType + R"( 77 layer_type: "OutputLayer", 83 layerName: "outputTensor", 87 connection: { sourceLayerIndex:1, outputSlotIndex:0 }, 92 dimensions: )" + outputShape + R"(, 93 dataType: )" + outputDataType + R"( 107 struct SimpleCastFixture : CastFixture
109 SimpleCastFixture() : CastFixture(
"[ 1, 6 ]",
117 RunTest<2, armnn::DataType::Signed32 , armnn::DataType::Float32>(
119 {{
"inputTensor", { 0, -1, 5, -100, 200, -255 }}},
120 {{
"outputTensor", { 0.0f, -1.0f, 5.0f, -100.0f, 200.0f, -255.0f }}});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(SimpleCast, SimpleCastFixture)
BOOST_AUTO_TEST_SUITE_END()