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

Function FullyConnectedActivationTest

delegate/test/FullyConnectedTest.cpp:39–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void FullyConnectedActivationTest(const std::vector<armnn::BackendId>& backends = {}, bool constantWeights = true)
40{
41 std::vector<int32_t> inputTensorShape { 1, 4, 1, 1 };
42 std::vector<int32_t> weightsTensorShape { 1, 4 };
43 std::vector<int32_t> biasTensorShape { 1 };
44 std::vector<int32_t> outputTensorShape { 1, 1 };
45
46 std::vector<float> inputValues = { -10, 20, 30, 40 };
47 std::vector<float> weightsData = { 2, 3, 4, -5 };
48
49 std::vector<float> expectedOutputValues = { 0 };
50
51 // bias is set std::vector<float> biasData = { 10 } in the model
52 FullyConnectedTest<float>(::tflite::TensorType_FLOAT32,
53 tflite::ActivationFunctionType_RELU,
54 inputTensorShape,
55 weightsTensorShape,
56 biasTensorShape,
57 outputTensorShape,
58 inputValues,
59 expectedOutputValues,
60 weightsData,
61 backends,
62 constantWeights);
63}
64
65void FullyConnectedInt8Test(const std::vector<armnn::BackendId>& backends = {}, bool constantWeights = true)
66{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected