aboutsummaryrefslogtreecommitdiff
path: root/delegate/classic/src/Redefine.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/classic/src/Redefine.hpp')
-rw-r--r--delegate/classic/src/Redefine.hpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/delegate/classic/src/Redefine.hpp b/delegate/classic/src/Redefine.hpp
index 7aef74f76b..41c62c33c8 100644
--- a/delegate/classic/src/Redefine.hpp
+++ b/delegate/classic/src/Redefine.hpp
@@ -13,7 +13,6 @@
#include <tensorflow/lite/c/builtin_op_data.h>
#include <tensorflow/lite/c/common.h>
#include <tensorflow/lite/minimal_logging.h>
-#include <numeric>
namespace armnnDelegate
{
@@ -84,36 +83,6 @@ TfLiteStatus VisitCastOperator(DelegateData& delegateData,
return Connect(layer, tfLiteNode, delegateData);
}
-
-TfLiteStatus CreateOutputTensorShape(const armnn::TensorInfo& inputTensorInfo,
- const std::vector<int32_t>& targetShape,
- armnn::ReshapeDescriptor& reshapeDesc)
-{
- std::vector<unsigned int> outputDims(targetShape.begin(), targetShape.end());
- const auto stretchDim = std::find(targetShape.begin(), targetShape.end(), -1);
-
- if (stretchDim != targetShape.end())
- {
- if (std::find(std::next(stretchDim), targetShape.end(), -1) != targetShape.end())
- {
- // Return kTfLiteError and log the error after returning
- return kTfLiteError;
- }
-
- auto targetNumElements =
- armnn::numeric_cast<unsigned int>(
- std::accumulate(targetShape.begin(), targetShape.end(), -1, std::multiplies<int32_t>()));
-
- auto stretchIndex = static_cast<size_t>(std::distance(targetShape.begin(), stretchDim));
- outputDims[stretchIndex] = inputTensorInfo.GetNumElements() / targetNumElements;
- }
-
- armnn::TensorShape outputShape = armnn::TensorShape(static_cast<unsigned int>(outputDims.size()),
- outputDims.data());
- reshapeDesc.m_TargetShape = outputShape;
- return kTfLiteOk;
-}
-
TfLiteStatus VisitReshapeOperator(DelegateData& delegateData,
TfLiteContext* tfLiteContext,
TfLiteNode* tfLiteNode,