diff options
Diffstat (limited to 'delegate/src')
-rw-r--r-- | delegate/src/Split.hpp | 6 | ||||
-rw-r--r-- | delegate/src/test/GatherTestHelper.hpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/delegate/src/Split.hpp b/delegate/src/Split.hpp index c76ad60ace..8248be9413 100644 --- a/delegate/src/Split.hpp +++ b/delegate/src/Split.hpp @@ -42,10 +42,9 @@ TfLiteStatus VisitSplitOperator(DelegateData& delegateData, return kTfLiteError; } - const armnn::TensorInfo& axisTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteAxisTensor); const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor); - ARMNN_ASSERT(axisTensorInfo.GetNumElements() == 1); + ARMNN_ASSERT(GetTensorInfoForTfLiteTensor(tfLiteAxisTensor).GetNumElements() == 1); auto* axisTensorDataPtr = tflite::GetTensorData<int32_t>(&tfLiteAxisTensor); std::vector<int32_t> axisTensorData(axisTensorDataPtr, axisTensorDataPtr + 1); const unsigned int splitDim = axisTensorData[0]; @@ -168,9 +167,8 @@ TfLiteStatus VisitSplitVOperator(DelegateData& delegateData, const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor); const armnn::TensorInfo& splitsTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteSplitsTensor); ARMNN_ASSERT(splitsTensorInfo.GetNumDimensions() == 1); + ARMNN_ASSERT(GetTensorInfoForTfLiteTensor(tfLiteAxisTensor).GetNumElements() == 1); - const armnn::TensorInfo& axisTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteAxisTensor); - ARMNN_ASSERT(axisTensorInfo.GetNumElements() == 1); auto* axisTensorDataPtr = tflite::GetTensorData<int32_t>(&tfLiteAxisTensor); std::vector<int32_t> axisTensorData(axisTensorDataPtr, axisTensorDataPtr + 1); diff --git a/delegate/src/test/GatherTestHelper.hpp b/delegate/src/test/GatherTestHelper.hpp index d8bfe37842..fcacf04134 100644 --- a/delegate/src/test/GatherTestHelper.hpp +++ b/delegate/src/test/GatherTestHelper.hpp @@ -71,7 +71,7 @@ std::vector<char> CreateGatherTfLiteModel(tflite::TensorType tensorType, flatbuffers::Offset<void> operatorBuiltinOptions = CreateGatherOptions(flatBufferBuilder).Union(); const std::vector<int> operatorInputs{{0, 1}}; - const std::vector<int> operatorOutputs{{2}}; + const std::vector<int> operatorOutputs{2}; flatbuffers::Offset<Operator> controlOperator = CreateOperator(flatBufferBuilder, 0, @@ -83,7 +83,7 @@ std::vector<char> CreateGatherTfLiteModel(tflite::TensorType tensorType, operatorBuiltinOptions); const std::vector<int> subgraphInputs{{0, 1}}; - const std::vector<int> subgraphOutputs{{2}}; + const std::vector<int> subgraphOutputs{2}; flatbuffers::Offset<SubGraph> subgraph = CreateSubGraph(flatBufferBuilder, flatBufferBuilder.CreateVector(tensors.data(), tensors.size()), |