MCPcopy Create free account
hub / github.com/ARM-software/armnn / ReshapeFlattenTest

Function ReshapeFlattenTest

delegate/test/ReshapeTest.cpp:97–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void ReshapeFlattenTest(bool useOption = true, const std::vector<armnn::BackendId>& backends = {})
98{
99 // Set input data
100 std::vector<int32_t> inputShape { 1, 3, 4, 1 };
101 std::vector<int32_t> outputShape { 6, 2 };
102 std::vector<int32_t> targetShape { -1, 2 };
103
104 std::vector<float> inputValues = { -5.0f, 8.0f, -10.0f, 7.0f,
105 8.0f, 12.0f, -15.0f, 2.0f,
106 3.0f, -4.0f, -1.0f, -11.0f };
107
108 std::vector<float> expectedOutputValues = { -5.0f, 8.0f, -10.0f, 7.0f,
109 8.0f, 12.0f, -15.0f, 2.0f,
110 3.0f, -4.0f, -1.0f, -11.0f };
111
112 RedefineTest<float>(tflite::BuiltinOperator_RESHAPE,
113 ::tflite::TensorType_FLOAT32,
114 inputShape,
115 outputShape,
116 inputValues,
117 expectedOutputValues,
118 targetShape,
119 useOption,
120 backends);
121}
122
123void ReshapeFlattenAllTest(bool useOption = true, const std::vector<armnn::BackendId>& backends = {})
124{

Callers 1

ReshapeTest.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected