aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTfLiteParser/test
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2023-06-14 14:51:17 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2023-06-22 12:12:31 +0000
commita7a605a7554158a47127b1988b94c6bfac0a64b9 (patch)
tree9dce948707b266e45b0a5a6974ca940b54ce7f42 /src/armnnTfLiteParser/test
parenta9c5c16154386fb1ec924c3778caf6b027bb57ee (diff)
downloadarmnn-a7a605a7554158a47127b1988b94c6bfac0a64b9.tar.gz
IVGCVSW-7785 BugFix: ExpandDims not working when batch!=1
* This commit fixes partially the ticket. In ToTensorInfo() we assume batch is 1 when it is unknown. We call OutputTensorInfoFromInputs() to amend this assumption/ However, this does not work for reshape layer. Therefore, we have to calculate the output shape in the ParseExpandDims(). Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Iedc32a44b4ec0d8b7d2cc0b08f38f0776402f7bd
Diffstat (limited to 'src/armnnTfLiteParser/test')
-rw-r--r--src/armnnTfLiteParser/test/ExpandDims.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/armnnTfLiteParser/test/ExpandDims.cpp b/src/armnnTfLiteParser/test/ExpandDims.cpp
index a9f021f76e..b43c3c62aa 100644
--- a/src/armnnTfLiteParser/test/ExpandDims.cpp
+++ b/src/armnnTfLiteParser/test/ExpandDims.cpp
@@ -1,12 +1,10 @@
//
-// Copyright © 2021 Arm Ltd. All rights reserved.
+// Copyright © 2021, 2023 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "ParserFlatbuffersFixture.hpp"
-#include "../TfLiteParser.hpp"
#include <string>
-#include <iostream>
TEST_SUITE("TensorflowLiteParser_ExpandDims")
{
@@ -47,15 +45,12 @@ struct ExpandDimsFixture : public ParserFlatbuffersFixture
}
},
{
- "shape": [ 1 ],
- "type": "UINT8",
+ "shape": [],
+ "type": "INT32",
"buffer": 2,
"name": "expand_dims",
"quantization": {
- "min": [ 0.0 ],
- "max": [ 255.0 ],
- "scale": [ 1.0 ],
- "zero_point": [ 0 ],
+ "details_type": "NONE",
}
},
],
@@ -77,7 +72,7 @@ struct ExpandDimsFixture : public ParserFlatbuffersFixture
]
}
)";
- SetupSingleInputSingleOutput("inputTensor", "outputTensor");
+ Setup();
}
};