From 171214c8ff275c90cd4f7fc23a34ec2c83b5ea39 Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Wed, 9 Sep 2020 09:07:37 +0100 Subject: IVGCVSW-5300 Remove some boost::numeric_cast from armnn/backends * Replaced with armnn/utility/NumericCast.hpp * Some exclusions in reference backend * Excluded as requires float implementation in NumericCast.hpp Signed-off-by: Matthew Sloyan Change-Id: I9e4e9cd502c865452128fa04415fd6f250baa855 --- .../backendsCommon/test/ActivationFixture.hpp | 11 ++- .../test/ComparisonEndToEndTestImpl.hpp | 4 +- .../backendsCommon/test/ConcatEndToEndTestImpl.hpp | 4 +- .../test/ElementwiseUnaryEndToEndTestImpl.hpp | 4 +- .../test/QuantizedLstmEndToEndTestImpl.cpp | 8 +- .../test/SplitterEndToEndTestImpl.hpp | 4 +- .../test/layerTests/ActivationTestImpl.cpp | 10 +- .../test/layerTests/Conv2dTestImpl.cpp | 101 +++++++++++---------- .../test/layerTests/LstmTestImpl.cpp | 19 ++-- .../test/layerTests/NormalizationTestImpl.cpp | 10 +- .../test/layerTests/Pooling2dTestImpl.cpp | 17 ++-- 11 files changed, 105 insertions(+), 87 deletions(-) (limited to 'src/backends/backendsCommon/test') diff --git a/src/backends/backendsCommon/test/ActivationFixture.hpp b/src/backends/backendsCommon/test/ActivationFixture.hpp index 8ff77f6c5d..d28174d6a6 100644 --- a/src/backends/backendsCommon/test/ActivationFixture.hpp +++ b/src/backends/backendsCommon/test/ActivationFixture.hpp @@ -7,9 +7,10 @@ #include "TensorCopyUtils.hpp" #include "WorkloadTestUtils.hpp" +#include + #include -#include #include struct ActivationFixture @@ -17,10 +18,10 @@ struct ActivationFixture ActivationFixture() { auto boostArrayExtents = boost::extents - [boost::numeric_cast(batchSize)] - [boost::numeric_cast(channels)] - [boost::numeric_cast(height)] - [boost::numeric_cast(width)]; + [armnn::numeric_cast(batchSize)] + [armnn::numeric_cast(channels)] + [armnn::numeric_cast(height)] + [armnn::numeric_cast(width)]; output.resize(boostArrayExtents); outputExpected.resize(boostArrayExtents); input.resize(boostArrayExtents); diff --git a/src/backends/backendsCommon/test/ComparisonEndToEndTestImpl.hpp b/src/backends/backendsCommon/test/ComparisonEndToEndTestImpl.hpp index dc53b7b246..c705f87b85 100644 --- a/src/backends/backendsCommon/test/ComparisonEndToEndTestImpl.hpp +++ b/src/backends/backendsCommon/test/ComparisonEndToEndTestImpl.hpp @@ -10,6 +10,8 @@ #include +#include + #include #include @@ -34,7 +36,7 @@ INetworkPtr CreateComparisonNetwork(const std::vector& inputShapes, for (unsigned int i = 0; i < inputShapes.size(); ++i) { TensorInfo inputTensorInfo(inputShapes[i], ArmnnTypeInput, qScale, qOffset); - IConnectableLayer* input = net->AddInputLayer(boost::numeric_cast(i)); + IConnectableLayer* input = net->AddInputLayer(armnn::numeric_cast(i)); Connect(input, comparisonLayer, inputTensorInfo, 0, i); } diff --git a/src/backends/backendsCommon/test/ConcatEndToEndTestImpl.hpp b/src/backends/backendsCommon/test/ConcatEndToEndTestImpl.hpp index ded3857282..58a1f39a78 100644 --- a/src/backends/backendsCommon/test/ConcatEndToEndTestImpl.hpp +++ b/src/backends/backendsCommon/test/ConcatEndToEndTestImpl.hpp @@ -10,6 +10,8 @@ #include +#include + #include #include @@ -38,7 +40,7 @@ INetworkPtr CreateConcatNetwork(const std::vector& inputShapes, for (unsigned int i = 0; i < inputShapes.size(); ++i) { TensorInfo inputTensorInfo(inputShapes[i], DataType, qScale, qOffset); - IConnectableLayer* input = net->AddInputLayer(boost::numeric_cast(i)); + IConnectableLayer* input = net->AddInputLayer(armnn::numeric_cast(i)); Connect(input, concat, inputTensorInfo, 0, i); } diff --git a/src/backends/backendsCommon/test/ElementwiseUnaryEndToEndTestImpl.hpp b/src/backends/backendsCommon/test/ElementwiseUnaryEndToEndTestImpl.hpp index 4c93735bc8..5fedaa2171 100644 --- a/src/backends/backendsCommon/test/ElementwiseUnaryEndToEndTestImpl.hpp +++ b/src/backends/backendsCommon/test/ElementwiseUnaryEndToEndTestImpl.hpp @@ -10,6 +10,8 @@ #include +#include + #include #include @@ -32,7 +34,7 @@ INetworkPtr CreateElementwiseUnaryNetwork(const TensorShape& inputShape, IConnectableLayer* elementwiseUnaryLayer = net->AddElementwiseUnaryLayer(descriptor, "elementwiseUnary"); TensorInfo inputTensorInfo(inputShape, ArmnnTypeInput, qScale, qOffset); - IConnectableLayer* input = net->AddInputLayer(boost::numeric_cast(0)); + IConnectableLayer* input = net->AddInputLayer(armnn::numeric_cast(0)); Connect(input, elementwiseUnaryLayer, inputTensorInfo, 0, 0); TensorInfo outputTensorInfo(outputShape, ArmnnTypeInput, qScale, qOffset); diff --git a/src/backends/backendsCommon/test/QuantizedLstmEndToEndTestImpl.cpp b/src/backends/backendsCommon/test/QuantizedLstmEndToEndTestImpl.cpp index b06b30c935..404a412ca0 100644 --- a/src/backends/backendsCommon/test/QuantizedLstmEndToEndTestImpl.cpp +++ b/src/backends/backendsCommon/test/QuantizedLstmEndToEndTestImpl.cpp @@ -13,6 +13,8 @@ #include #include +#include + #include #include @@ -27,9 +29,9 @@ using MultiArray = const boost::multi_array&; armnn::INetworkPtr CreateQuantizedLstmNetwork(MultiArray input, MultiArray expectedOutput) { - auto batchSize = boost::numeric_cast(input.shape()[0]); - auto inputSize = boost::numeric_cast(input.shape()[1]); - auto outputSize = boost::numeric_cast(expectedOutput.shape()[1]); + auto batchSize = armnn::numeric_cast(input.shape()[0]); + auto inputSize = armnn::numeric_cast(input.shape()[1]); + auto outputSize = armnn::numeric_cast(expectedOutput.shape()[1]); float inputOutputScale = 0.0078125f; int32_t inputOutputOffset = 128; diff --git a/src/backends/backendsCommon/test/SplitterEndToEndTestImpl.hpp b/src/backends/backendsCommon/test/SplitterEndToEndTestImpl.hpp index 6c4c1772b6..257a81b50b 100644 --- a/src/backends/backendsCommon/test/SplitterEndToEndTestImpl.hpp +++ b/src/backends/backendsCommon/test/SplitterEndToEndTestImpl.hpp @@ -8,6 +8,8 @@ #include +#include + #include #include @@ -63,7 +65,7 @@ INetworkPtr CreateSplitterNetwork(const TensorShape& inputShape, for (unsigned int i = 0; i < outputShapes.size(); ++i) { TensorInfo outputTensorInfo(outputShapes[i], DataType, qScale, qOffset); - IConnectableLayer* output = net->AddOutputLayer(boost::numeric_cast(i)); + IConnectableLayer* output = net->AddOutputLayer(armnn::numeric_cast(i)); Connect(splitter, output, outputTensorInfo, i, 0); } diff --git a/src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp index 543ea7716a..6d83b1ca99 100644 --- a/src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp @@ -13,6 +13,8 @@ #include #include +#include + #include #include @@ -1261,10 +1263,10 @@ LayerTestResult CompareActivationTestImpl( LayerTestResult ret(outputTensorInfo); auto boostArrayExtents = boost::extents - [boost::numeric_cast(batchSize)] - [boost::numeric_cast(channels)] - [boost::numeric_cast(height)] - [boost::numeric_cast(width)]; + [armnn::numeric_cast(batchSize)] + [armnn::numeric_cast(channels)] + [armnn::numeric_cast(height)] + [armnn::numeric_cast(width)]; ret.output.resize(boostArrayExtents); ret.outputExpected.resize(boostArrayExtents); diff --git a/src/backends/backendsCommon/test/layerTests/Conv2dTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/Conv2dTestImpl.cpp index e99a26e81e..690d1cd66f 100644 --- a/src/backends/backendsCommon/test/layerTests/Conv2dTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/Conv2dTestImpl.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -219,20 +220,20 @@ LayerTestResult SimpleConvolution2dTestImpl( uint32_t dilationY = 1) { armnn::IgnoreUnused(memoryManager); - unsigned int inputHeight = boost::numeric_cast(originalInput.shape()[2]); - unsigned int inputWidth = boost::numeric_cast(originalInput.shape()[3]); - unsigned int inputChannels = boost::numeric_cast(originalInput.shape()[1]); - unsigned int inputNum = boost::numeric_cast(originalInput.shape()[0]); + unsigned int inputHeight = armnn::numeric_cast(originalInput.shape()[2]); + unsigned int inputWidth = armnn::numeric_cast(originalInput.shape()[3]); + unsigned int inputChannels = armnn::numeric_cast(originalInput.shape()[1]); + unsigned int inputNum = armnn::numeric_cast(originalInput.shape()[0]); - unsigned int outputHeight = boost::numeric_cast(originalOutputExpected.shape()[2]); - unsigned int outputWidth = boost::numeric_cast(originalOutputExpected.shape()[3]); - unsigned int outputChannels = boost::numeric_cast(originalOutputExpected.shape()[1]); - unsigned int outputNum = boost::numeric_cast(originalOutputExpected.shape()[0]); + unsigned int outputHeight = armnn::numeric_cast(originalOutputExpected.shape()[2]); + unsigned int outputWidth = armnn::numeric_cast(originalOutputExpected.shape()[3]); + unsigned int outputChannels = armnn::numeric_cast(originalOutputExpected.shape()[1]); + unsigned int outputNum = armnn::numeric_cast(originalOutputExpected.shape()[0]); - unsigned int kernelHeight = boost::numeric_cast(originalKernel.shape()[2]); - unsigned int kernelWidth = boost::numeric_cast(originalKernel.shape()[3]); - unsigned int kernelChannels = boost::numeric_cast(originalKernel.shape()[1]); - unsigned int kernelDepthMul = boost::numeric_cast(originalKernel.shape()[0]); + unsigned int kernelHeight = armnn::numeric_cast(originalKernel.shape()[2]); + unsigned int kernelWidth = armnn::numeric_cast(originalKernel.shape()[3]); + unsigned int kernelChannels = armnn::numeric_cast(originalKernel.shape()[1]); + unsigned int kernelDepthMul = armnn::numeric_cast(originalKernel.shape()[0]); bool biasEnabled = bias.size() > 0; @@ -385,20 +386,20 @@ LayerTestResult SimpleConvolution2dNhwcTestImpl( uint32_t strideY = 1) { armnn::IgnoreUnused(qScale, qOffset); - unsigned int inputNum = boost::numeric_cast(input.shape()[0]); - unsigned int inputChannels = boost::numeric_cast(input.shape()[3]); - unsigned int inputHeight = boost::numeric_cast(input.shape()[1]); - unsigned int inputWidth = boost::numeric_cast(input.shape()[2]); + unsigned int inputNum = armnn::numeric_cast(input.shape()[0]); + unsigned int inputChannels = armnn::numeric_cast(input.shape()[3]); + unsigned int inputHeight = armnn::numeric_cast(input.shape()[1]); + unsigned int inputWidth = armnn::numeric_cast(input.shape()[2]); - unsigned int kernelChanMul = boost::numeric_cast(kernel.shape()[0]); - unsigned int kernelChannels = boost::numeric_cast(kernel.shape()[3]); - unsigned int kernelHeight = boost::numeric_cast(kernel.shape()[1]); - unsigned int kernelWidth = boost::numeric_cast(kernel.shape()[2]); + unsigned int kernelChanMul = armnn::numeric_cast(kernel.shape()[0]); + unsigned int kernelChannels = armnn::numeric_cast(kernel.shape()[3]); + unsigned int kernelHeight = armnn::numeric_cast(kernel.shape()[1]); + unsigned int kernelWidth = armnn::numeric_cast(kernel.shape()[2]); - unsigned int outputNum = boost::numeric_cast(outputExpected.shape()[0]); - unsigned int outputChannels = boost::numeric_cast(outputExpected.shape()[3]); - unsigned int outputHeight = boost::numeric_cast(outputExpected.shape()[1]); - unsigned int outputWidth = boost::numeric_cast(outputExpected.shape()[2]); + unsigned int outputNum = armnn::numeric_cast(outputExpected.shape()[0]); + unsigned int outputChannels = armnn::numeric_cast(outputExpected.shape()[3]); + unsigned int outputHeight = armnn::numeric_cast(outputExpected.shape()[1]); + unsigned int outputWidth = armnn::numeric_cast(outputExpected.shape()[2]); bool biasEnabled = bias.size() > 0; @@ -1643,18 +1644,18 @@ LayerTestResult DepthwiseConvolution2dAsymmetricTestImpl( uint32_t strideX = 1, uint32_t strideY = 1) { - unsigned int inputNum = boost::numeric_cast(input.shape()[0]); - unsigned int inputChannels = boost::numeric_cast(input.shape()[1]); - unsigned int inputHeight = boost::numeric_cast(input.shape()[2]); - unsigned int inputWidth = boost::numeric_cast(input.shape()[3]); - unsigned int kernelChanMul = boost::numeric_cast(kernel.shape()[0]); - unsigned int kernelChannels = boost::numeric_cast(kernel.shape()[1]); - unsigned int kernelHeight = boost::numeric_cast(kernel.shape()[2]); - unsigned int kernelWidth = boost::numeric_cast(kernel.shape()[3]); - unsigned int outputNum = boost::numeric_cast(outputExpected.shape()[0]); - unsigned int outputChannels = boost::numeric_cast(outputExpected.shape()[1]); - unsigned int outputHeight = boost::numeric_cast(outputExpected.shape()[2]); - unsigned int outputWidth = boost::numeric_cast(outputExpected.shape()[3]); + unsigned int inputNum = armnn::numeric_cast(input.shape()[0]); + unsigned int inputChannels = armnn::numeric_cast(input.shape()[1]); + unsigned int inputHeight = armnn::numeric_cast(input.shape()[2]); + unsigned int inputWidth = armnn::numeric_cast(input.shape()[3]); + unsigned int kernelChanMul = armnn::numeric_cast(kernel.shape()[0]); + unsigned int kernelChannels = armnn::numeric_cast(kernel.shape()[1]); + unsigned int kernelHeight = armnn::numeric_cast(kernel.shape()[2]); + unsigned int kernelWidth = armnn::numeric_cast(kernel.shape()[3]); + unsigned int outputNum = armnn::numeric_cast(outputExpected.shape()[0]); + unsigned int outputChannels = armnn::numeric_cast(outputExpected.shape()[1]); + unsigned int outputHeight = armnn::numeric_cast(outputExpected.shape()[2]); + unsigned int outputWidth = armnn::numeric_cast(outputExpected.shape()[3]); // If a bias is used, its size must equal the number of output channels. bool biasEnabled = bias.size() > 0; @@ -2151,20 +2152,20 @@ LayerTestResult DepthwiseConvolution2dTestImpl( uint32_t dilationX = 1, uint32_t dilationY = 1) { - unsigned int inputHeight = boost::numeric_cast(originalInput.shape()[2]); - unsigned int inputWidth = boost::numeric_cast(originalInput.shape()[3]); - unsigned int inputChannels = boost::numeric_cast(originalInput.shape()[1]); - unsigned int inputNum = boost::numeric_cast(originalInput.shape()[0]); - - unsigned int outputHeight = boost::numeric_cast(originalOutputExpected.shape()[2]); - unsigned int outputWidth = boost::numeric_cast(originalOutputExpected.shape()[3]); - unsigned int outputChannels = boost::numeric_cast(originalOutputExpected.shape()[1]); - unsigned int outputNum = boost::numeric_cast(originalOutputExpected.shape()[0]); - - unsigned int kernelHeight = boost::numeric_cast(originalKernel.shape()[2]); - unsigned int kernelWidth = boost::numeric_cast(originalKernel.shape()[3]); - unsigned int kernelChannels = boost::numeric_cast(originalKernel.shape()[1]); - unsigned int kernelDepthMul = boost::numeric_cast(originalKernel.shape()[0]); + unsigned int inputHeight = armnn::numeric_cast(originalInput.shape()[2]); + unsigned int inputWidth = armnn::numeric_cast(originalInput.shape()[3]); + unsigned int inputChannels = armnn::numeric_cast(originalInput.shape()[1]); + unsigned int inputNum = armnn::numeric_cast(originalInput.shape()[0]); + + unsigned int outputHeight = armnn::numeric_cast(originalOutputExpected.shape()[2]); + unsigned int outputWidth = armnn::numeric_cast(originalOutputExpected.shape()[3]); + unsigned int outputChannels = armnn::numeric_cast(originalOutputExpected.shape()[1]); + unsigned int outputNum = armnn::numeric_cast(originalOutputExpected.shape()[0]); + + unsigned int kernelHeight = armnn::numeric_cast(originalKernel.shape()[2]); + unsigned int kernelWidth = armnn::numeric_cast(originalKernel.shape()[3]); + unsigned int kernelChannels = armnn::numeric_cast(originalKernel.shape()[1]); + unsigned int kernelDepthMul = armnn::numeric_cast(originalKernel.shape()[0]); bool biasEnabled = bias.size() > 0; diff --git a/src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp index 8f39f42452..088ca3b4c2 100644 --- a/src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp @@ -7,6 +7,7 @@ #include +#include #include @@ -144,9 +145,9 @@ LstmNoCifgNoPeepholeNoProjectionTestImpl( armnn::DataType constantDataType = armnn::DataType::Float32) { IgnoreUnused(memoryManager); - unsigned int batchSize = boost::numeric_cast(input.shape()[0]); - unsigned int inputSize = boost::numeric_cast(input.shape()[1]); - unsigned int outputSize = boost::numeric_cast(outputExpected.shape()[1]); + unsigned int batchSize = armnn::numeric_cast(input.shape()[0]); + unsigned int inputSize = armnn::numeric_cast(input.shape()[1]); + unsigned int outputSize = armnn::numeric_cast(outputExpected.shape()[1]); // cellSize and outputSize have the same size when there is no projection. unsigned numUnits = outputSize; @@ -1069,10 +1070,10 @@ LayerTestResult LstmLayerWithCifgWithPeepholeNoProjectionTestImpl( bool peepholeEnabled = true; bool projectionEnabled = false; // These are not the input and the output of Lstm yet - unsigned int batchSize = boost::numeric_cast(input.shape()[0]); - unsigned int inputSize = boost::numeric_cast(input.shape()[1]); + unsigned int batchSize = armnn::numeric_cast(input.shape()[0]); + unsigned int inputSize = armnn::numeric_cast(input.shape()[1]); - unsigned int outputSize = boost::numeric_cast(outputExpected.shape()[1]); + unsigned int outputSize = armnn::numeric_cast(outputExpected.shape()[1]); const unsigned int cellSize = outputSize; @@ -1560,9 +1561,9 @@ LayerTestResult QuantizedLstmTestImpl( const boost::multi_array& outputExpected) { IgnoreUnused(memoryManager); - auto numBatches = boost::numeric_cast(input.shape()[0]); - auto inputSize = boost::numeric_cast(input.shape()[1]); - auto outputSize = boost::numeric_cast(outputExpected.shape()[1]); + auto numBatches = armnn::numeric_cast(input.shape()[0]); + auto inputSize = armnn::numeric_cast(input.shape()[1]); + auto outputSize = armnn::numeric_cast(outputExpected.shape()[1]); // Scale/Offset for input/output, cellState In/Out, weights, bias float inputOutputScale = 0.0078125f; diff --git a/src/backends/backendsCommon/test/layerTests/NormalizationTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/NormalizationTestImpl.cpp index b42b180dc9..2e8e16f0c2 100644 --- a/src/backends/backendsCommon/test/layerTests/NormalizationTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/NormalizationTestImpl.cpp @@ -8,6 +8,8 @@ #include #include +#include + #include #include @@ -102,7 +104,7 @@ LayerTestResult SimpleNormalizationTestImpl( // pow((kappa + (accumulatedScale * alpha)), beta) // ...where accumulatedScale is the sum of every element squared. float divisor[inputNum]; - for(int i = 0; i < boost::numeric_cast(inputNum); i++) + for(int i = 0; i < armnn::numeric_cast(inputNum); i++) { float accumulatedScale = input[i][0][0][0]*input[i][0][0][0] + input[i][0][0][1]*input[i][0][0][1] + @@ -129,11 +131,11 @@ LayerTestResult SimpleNormalizationTestImpl( // ...where adjacent channels means within half the normSize for the channel // The test data has only one channel, so this is simplified below. std::vector outputVector; - for (int n = 0; n < boost::numeric_cast(inputNum); ++n) + for (int n = 0; n < armnn::numeric_cast(inputNum); ++n) { - for (int h = 0; h < boost::numeric_cast(inputHeight); ++h) + for (int h = 0; h < armnn::numeric_cast(inputHeight); ++h) { - for (int w = 0; w < boost::numeric_cast(inputWidth); ++w) + for (int w = 0; w < armnn::numeric_cast(inputWidth); ++w) { float accumulatedScale = input[n][0][h][w]*input[n][0][h][w]; float scale = powf((kappa + accumulatedScale * alpha), -beta); diff --git a/src/backends/backendsCommon/test/layerTests/Pooling2dTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/Pooling2dTestImpl.cpp index a4f87ff3ed..70e2e61475 100644 --- a/src/backends/backendsCommon/test/layerTests/Pooling2dTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/Pooling2dTestImpl.cpp @@ -15,6 +15,7 @@ #include #include +#include #include @@ -48,15 +49,15 @@ LayerTestResult SimplePooling2dTestImpl( auto widthIndex = dimensionIndices.GetWidthIndex(); auto channelsIndex = dimensionIndices.GetChannelsIndex(); - unsigned int inputHeight = boost::numeric_cast(input.shape()[heightIndex]); - unsigned int inputWidth = boost::numeric_cast(input.shape()[widthIndex]); - unsigned int inputChannels = boost::numeric_cast(input.shape()[channelsIndex]); - unsigned int inputBatchSize = boost::numeric_cast(input.shape()[0]); + unsigned int inputHeight = armnn::numeric_cast(input.shape()[heightIndex]); + unsigned int inputWidth = armnn::numeric_cast(input.shape()[widthIndex]); + unsigned int inputChannels = armnn::numeric_cast(input.shape()[channelsIndex]); + unsigned int inputBatchSize = armnn::numeric_cast(input.shape()[0]); - unsigned int outputHeight = boost::numeric_cast(outputExpected.shape()[heightIndex]); - unsigned int outputWidth = boost::numeric_cast(outputExpected.shape()[widthIndex]); - unsigned int outputChannels = boost::numeric_cast(outputExpected.shape()[channelsIndex]); - unsigned int outputBatchSize = boost::numeric_cast(outputExpected.shape()[0]); + unsigned int outputHeight = armnn::numeric_cast(outputExpected.shape()[heightIndex]); + unsigned int outputWidth = armnn::numeric_cast(outputExpected.shape()[widthIndex]); + unsigned int outputChannels = armnn::numeric_cast(outputExpected.shape()[channelsIndex]); + unsigned int outputBatchSize = armnn::numeric_cast(outputExpected.shape()[0]); armnn::TensorInfo inputTensorInfo = armnnUtils::GetTensorInfo( inputBatchSize, inputChannels, inputHeight, inputWidth, dataLayout, ArmnnType); -- cgit v1.2.1