aboutsummaryrefslogtreecommitdiff
path: root/tests/ImagePreprocessor.cpp
diff options
context:
space:
mode:
authorNattapat Chaimanowong <nattapat.chaimanowong@arm.com>2018-10-26 10:24:14 +0100
committernattapat.chaimanowong <nattapat.chaimanowong@arm.com>2018-10-26 12:38:34 +0000
commitd8eee59735526ead6b87343c3ed9069e682b6e8c (patch)
tree44b994c98857b28674fb4911cb20489aaaecc437 /tests/ImagePreprocessor.cpp
parentd4dfa684941a21314b70593d01b0fc2167eebad4 (diff)
downloadarmnn-d8eee59735526ead6b87343c3ed9069e682b6e8c.tar.gz
IVGCVSW-2029 Fix fully connected layer support in TfLite Parser and implement test for TfLite VGG16 quantized
Change-Id: I2061f62f62684b963fa0f090718f1dcffe5c93ce
Diffstat (limited to 'tests/ImagePreprocessor.cpp')
-rw-r--r--tests/ImagePreprocessor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/ImagePreprocessor.cpp b/tests/ImagePreprocessor.cpp
index 1f29cffe65..8ceedd2d04 100644
--- a/tests/ImagePreprocessor.cpp
+++ b/tests/ImagePreprocessor.cpp
@@ -33,10 +33,16 @@ unsigned int ImagePreprocessor<TDataType>::GetLabelAndResizedImageAsFloat(unsign
InferenceTestImage::ResizingMethods::BilinearAndNormalized,
m_Mean, m_Stddev);
+ // duplicate data across the batch
+ for (unsigned int i = 1; i < m_BatchSize; i++)
+ {
+ result.insert( result.end(), result.begin(), result.begin() + GetNumImageElements() );
+ }
+
if (m_DataFormat == DataFormat::NCHW)
{
const armnn::PermutationVector NHWCToArmNN = { 0, 2, 3, 1 };
- armnn::TensorShape dstShape({1, 3, m_Height, m_Width});
+ armnn::TensorShape dstShape({m_BatchSize, 3, m_Height, m_Width});
std::vector<float> tempImage(result.size());
armnnUtils::Permute<float>(dstShape, NHWCToArmNN, result.data(), tempImage.data());
result.swap(tempImage);