6 #include <boost/test/unit_test.hpp> 8 #include "../TfLiteParser.hpp" 17 explicit CastFixture(
const std::string& inputShape,
18 const std::string& outputShape,
19 const std::string& inputDataType,
20 const std::string& outputDataType)
25 "operator_codes": [ { "builtin_code": "CAST" } ], 29 "shape": )" + inputShape + R"(, 30 "type": )" + inputDataType + R"(, 32 "name": "inputTensor", 41 "shape": )" + outputShape + R"(, 42 "type": )" + outputDataType + R"(, 44 "name": "outputTensor", 60 "custom_options_format": "FLEXBUFFERS" 64 "buffers" : [ {}, {} ] 71 struct SimpleCastFixture : CastFixture
73 SimpleCastFixture() : CastFixture(
"[ 1, 6 ]",
81 RunTest<2, armnn::DataType::Signed32 , armnn::DataType::Float32>(
83 {{
"inputTensor", { 0, -1, 5, -100, 200, -255 }}},
84 {{
"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()
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)