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

Function FullyConnectedFp32Test

delegate/test/FullyConnectedTest.cpp:13–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11{
12
13void FullyConnectedFp32Test(const std::vector<armnn::BackendId>& backends = {}, bool constantWeights = true)
14{
15 std::vector<int32_t> inputTensorShape { 1, 4, 1, 1 };
16 std::vector<int32_t> weightsTensorShape { 1, 4 };
17 std::vector<int32_t> biasTensorShape { 1 };
18 std::vector<int32_t> outputTensorShape { 1, 1 };
19
20 std::vector<float> inputValues = { 10, 20, 30, 40 };
21 std::vector<float> weightsData = { 2, 3, 4, 5 };
22
23 std::vector<float> expectedOutputValues = { (400 + 10) };
24
25 // bias is set std::vector<float> biasData = { 10 } in the model
26 FullyConnectedTest<float>(::tflite::TensorType_FLOAT32,
27 tflite::ActivationFunctionType_NONE,
28 inputTensorShape,
29 weightsTensorShape,
30 biasTensorShape,
31 outputTensorShape,
32 inputValues,
33 expectedOutputValues,
34 weightsData,
35 backends,
36 constantWeights);
37}
38
39void FullyConnectedActivationTest(const std::vector<armnn::BackendId>& backends = {}, bool constantWeights = true)
40{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected