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

Function ReshapeSimpleTest

delegate/test/ReshapeTest.cpp:17–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15{
16
17void ReshapeSimpleTest(bool useOption = true, const std::vector<armnn::BackendId>& backends = {})
18{
19 // Set input data
20 std::vector<int32_t> inputShape { 1, 3, 4, 1 };
21 std::vector<int32_t> outputShape { 1, 3, 2, 2 };
22 std::vector<int32_t> targetShape { 1, 3, 2, 2 };
23
24 std::vector<float> inputValues = { -5.0f, 8.0f, -10.0f, 7.0f,
25 8.0f, 12.0f, -15.0f, 2.0f,
26 3.0f, -4.0f, -1.0f, -11.0f };
27
28 std::vector<float> expectedOutputValues = { -5.0f, 8.0f, -10.0f, 7.0f,
29 8.0f, 12.0f, -15.0f, 2.0f,
30 3.0f, -4.0f, -1.0f, -11.0f };
31
32 RedefineTest<float>(tflite::BuiltinOperator_RESHAPE,
33 ::tflite::TensorType_FLOAT32,
34 inputShape,
35 outputShape,
36 inputValues,
37 expectedOutputValues,
38 targetShape,
39 useOption,
40 backends);
41}
42
43using namespace half_float::literal;
44

Callers 1

ReshapeTest.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected