IVGCVSW-2029 Fix fully connected layer support in TfLite Parser and implement test for TfLite VGG16 quantized
Change-Id: I2061f62f62684b963fa0f090718f1dcffe5c93ce
diff --git a/src/armnnTfLiteParser/TfLiteParser.cpp b/src/armnnTfLiteParser/TfLiteParser.cpp
index 8b1d3e6..5e0d4b7 100644
--- a/src/armnnTfLiteParser/TfLiteParser.cpp
+++ b/src/armnnTfLiteParser/TfLiteParser.cpp
@@ -1231,6 +1231,7 @@
FullyConnectedDescriptor desc;
desc.m_BiasEnabled = false;
+ desc.m_TransposeWeightMatrix = true;
auto inputs = GetInputs(m_Model, subgraphIndex, operatorIndex);
auto outputs = GetOutputs(m_Model, subgraphIndex, operatorIndex);
diff --git a/src/armnnTfLiteParser/test/FullyConnected.cpp b/src/armnnTfLiteParser/test/FullyConnected.cpp
index 2853fe9..14ca57c 100644
--- a/src/armnnTfLiteParser/test/FullyConnected.cpp
+++ b/src/armnnTfLiteParser/test/FullyConnected.cpp
@@ -118,7 +118,7 @@
FullyConnectedWithNoBiasFixture()
: FullyConnectedFixture("[ 1, 4, 1, 1 ]", // inputShape
"[ 1, 1 ]", // outputShape
- "[ 4, 1 ]", // filterShape
+ "[ 1, 4 ]", // filterShape
"[ 2, 3, 4, 5 ]") // filterData
{}
};
@@ -136,7 +136,7 @@
FullyConnectedWithBiasFixture()
: FullyConnectedFixture("[ 1, 4, 1, 1 ]", // inputShape
"[ 1, 1 ]", // outputShape
- "[ 4, 1 ]", // filterShape
+ "[ 1, 4 ]", // filterShape
"[ 2, 3, 4, 5 ]", // filterData
"[ 1 ]", // biasShape
"[ 10, 0, 0, 0 ]" ) // biasData