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

Function ReshapeSimpleFloat16Test

delegate/test/ReshapeTest.cpp:45–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43using namespace half_float::literal;
44
45void ReshapeSimpleFloat16Test(bool useOption = true, const std::vector<armnn::BackendId>& backends = {})
46{
47 // Set input data
48 std::vector<int32_t> inputShape { 1, 3, 4, 1 };
49 std::vector<int32_t> outputShape { 1, 3, 2, 2 };
50 std::vector<int32_t> targetShape { 1, 3, 2, 2 };
51
52 std::vector<Half> inputValues = { 5._h, -8._h, -10._h, 7._h,
53 8._h, 12._h, -15._h, 2._h,
54 3._h, -4._h, -1._h, -11._h };
55
56 std::vector<Half> expectedOutputValues = { 5._h, -8._h, -10._h, 7._h,
57 8._h, 12._h, -15._h, 2._h,
58 3._h, -4._h, -1._h, -11._h };
59
60 RedefineTest<Half>(tflite::BuiltinOperator_RESHAPE,
61 ::tflite::TensorType_FLOAT16,
62 inputShape,
63 outputShape,
64 inputValues,
65 expectedOutputValues,
66 targetShape,
67 useOption,
68 backends);
69}
70
71void ReshapeReduceDimTest(bool useOption = true, const std::vector<armnn::BackendId>& backends = {})
72{

Callers 1

ReshapeTest.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected