aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/optimizations/FuseActivationTests.cpp
diff options
context:
space:
mode:
authorJan Eilers <jan.eilers@arm.com>2021-06-02 12:01:25 +0100
committerJan Eilers <jan.eilers@arm.com>2021-06-16 11:31:42 +0000
commit53ef79504b4c881c572735393c2eede5fa556c46 (patch)
treef6e0cd27c4d03075fa154074c5b12d7c8c3149f7 /src/armnn/test/optimizations/FuseActivationTests.cpp
parent77fe76bfa8cb798943821d1f3e432c228e1cdee3 (diff)
downloadarmnn-53ef79504b4c881c572735393c2eede5fa556c46.tar.gz
IVGCVSW-5826 Change weights layout for depthwise to [1,H,W,I*M]
* This change is necessary because tflite uses a [1,H,W,I*M] format and uses the I*M dimension for per axis quantization. Our previous layout [M,I,H,W] can't handle the correlating quantization scales. * Updates Onnx-, TfLiteParser and TfliteDelegate * Updates the CpuRef, CpuAcc and GpuAcc backends * Adjusts unit tests * Adds test to ensure models with old layout can still be read and executed * Adds conversion function to previous layout [1,H,W,I*M] --> [M,I,H,W] which can be used by backend developers !android-nn-driver:5553 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ifef23368b8c3702cf315a5838d214f7dc13c0152
Diffstat (limited to 'src/armnn/test/optimizations/FuseActivationTests.cpp')
-rw-r--r--src/armnn/test/optimizations/FuseActivationTests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/armnn/test/optimizations/FuseActivationTests.cpp b/src/armnn/test/optimizations/FuseActivationTests.cpp
index 9e332136f6..35b5bbc2da 100644
--- a/src/armnn/test/optimizations/FuseActivationTests.cpp
+++ b/src/armnn/test/optimizations/FuseActivationTests.cpp
@@ -81,9 +81,9 @@ public:
using LayerType = DepthwiseConvolution2dLayer;
static const bool isElementWise = false;
- static TensorShape GetInputShape() { return TensorShape( {1, 4, 4, 3}); } // NHWCin
- static TensorShape GetOutputShape() { return TensorShape( {1, 3, 3, 12}); } // NHWCout
- static TensorShape GetWeightsShape() { return TensorShape( {4, 3, 2, 2}); } // MCinHW
+ static TensorShape GetInputShape() { return TensorShape( {1, 4, 4, 3}); } // [N,H,W,Cin]
+ static TensorShape GetOutputShape() { return TensorShape( {1, 3, 3, 12}); } // [N,H,W,Cout]
+ static TensorShape GetWeightsShape() { return TensorShape( {1, 2, 2, 12}); } // [1,H,W,Cout]
constexpr static const unsigned int inputSize = 48; //batchIn * heightIn * widthIn * channelIn;
constexpr static const unsigned int outputSize = 108; //batchOut * heightOut * widthOut * channelOut;