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

Function PreluFloatSimpleTest

delegate/test/PreluTest.cpp:12–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace armnnDelegate {
11
12void PreluFloatSimpleTest(bool isAlphaConst, bool isDynamicOutput = false)
13{
14 std::vector<int32_t> inputShape { 1, 2, 3 };
15 std::vector<int32_t> alphaShape { 1 };
16 std::vector<int32_t> outputShape { 1, 2, 3 };
17
18 if (isDynamicOutput)
19 {
20 outputShape.clear();
21 }
22
23 std::vector<float> inputData = { -14.f, 2.f, 0.f, 1.f, -5.f, 14.f };
24 std::vector<float> alphaData = { 0.5f };
25 std::vector<float> expectedOutput = { -7.f, 2.f, 0.f, 1.f, -2.5f, 14.f };
26
27 PreluTest(tflite::BuiltinOperator_PRELU,
28 ::tflite::TensorType_FLOAT32,
29 inputShape,
30 alphaShape,
31 outputShape,
32 inputData,
33 alphaData,
34 expectedOutput,
35 isAlphaConst);
36}
37
38TEST_SUITE("PreluTests")
39{

Callers 1

PreluTest.cppFile · 0.85

Calls 2

PreluTestFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected