aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJames Conroy <james.conroy@arm.com>2020-01-22 16:40:57 +0000
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-01-24 14:02:34 +0000
commit1bde8e31935ac375fd0aaa0dfddb0f7851c16087 (patch)
tree71352ab311dfac773551694013477ec8befe0a86 /test
parentf2e175c99612189d640cb3dbb05a5dbb3c92b22f (diff)
downloadandroid-nn-driver-1bde8e31935ac375fd0aaa0dfddb0f7851c16087.tar.gz
IVGCVSW-4260 Fix Transpose CpuRef VTS failures
* Adds missing conversion for permutation vector from ANN/TF/Numpy format to ArmNN format. * Corrects legacy tests based on incorrect permutation vectors. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I767142378055e484d22f3ffba34580c528370cfe
Diffstat (limited to 'test')
-rw-r--r--test/1.1/Transpose.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/1.1/Transpose.cpp b/test/1.1/Transpose.cpp
index 1b30aa6b..4d4238ba 100644
--- a/test/1.1/Transpose.cpp
+++ b/test/1.1/Transpose.cpp
@@ -102,7 +102,7 @@ void TransposeTestImpl(const TestTensor & inputs, int32_t perm[],
BOOST_DATA_TEST_CASE(Transpose , COMPUTE_DEVICES)
{
- int32_t perm[] = {3, 2, 0, 1};
+ int32_t perm[] = {2, 3, 1, 0};
TestTensor input{armnn::TensorShape{1, 2, 2, 2},{1, 2, 3, 4, 5, 6, 7, 8}};
TestTensor expected{armnn::TensorShape{2, 2, 2, 1},{1, 5, 2, 6, 3, 7, 4, 8}};
@@ -111,7 +111,7 @@ BOOST_DATA_TEST_CASE(Transpose , COMPUTE_DEVICES)
BOOST_DATA_TEST_CASE(TransposeNHWCToArmNN , COMPUTE_DEVICES)
{
- int32_t perm[] = {0, 2, 3, 1};
+ int32_t perm[] = {0, 3, 1, 2};
TestTensor input{armnn::TensorShape{1, 2, 2, 3},{1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33}};
TestTensor expected{armnn::TensorShape{1, 3, 2, 2},{1, 11, 21, 31, 2, 12, 22, 32, 3, 13, 23, 33}};
@@ -120,7 +120,7 @@ BOOST_DATA_TEST_CASE(TransposeNHWCToArmNN , COMPUTE_DEVICES)
BOOST_DATA_TEST_CASE(TransposeArmNNToNHWC , COMPUTE_DEVICES)
{
- int32_t perm[] = {0, 3, 1, 2};
+ int32_t perm[] = {0, 2, 3, 1};
TestTensor input{armnn::TensorShape{1, 2, 2, 2},{1, 2, 3, 4, 5, 6, 7, 8}};
TestTensor expected{armnn::TensorShape{1, 2, 2, 2},{1, 5, 2, 6, 3, 7, 4, 8}};