| 17 | const armnn::PermutationVector ArmNNToNHWC = { 0, 3, 1, 2 }; |
| 18 | |
| 19 | void ProcessConcatInputTensorInfo(armnn::TensorInfo& inputTensorInfo, |
| 20 | armnn::OriginsDescriptor& concatDescriptor, |
| 21 | const unsigned int& concatAxis, |
| 22 | unsigned int inputIndex, |
| 23 | unsigned int& mergeDimOrigin) |
| 24 | { |
| 25 | const uint32_t inputRank = concatDescriptor.GetNumDimensions(); |
| 26 | |
| 27 | // double check dimensions of the tensors |
| 28 | if (inputTensorInfo.GetNumDimensions() != inputRank) |
| 29 | { |
| 30 | throw armnn::ParseException(fmt::format( |
| 31 | "The number of dimensions: {0} for input tensors of the " |
| 32 | "concatenation op should be {1} {2}", |
| 33 | inputTensorInfo.GetNumDimensions(), |
| 34 | inputRank, |
| 35 | CHECK_LOCATION().AsString())); |
| 36 | } |
| 37 | |
| 38 | for (unsigned int j = 0; j < concatAxis; ++j) |
| 39 | { |
| 40 | concatDescriptor.SetViewOriginCoord(inputIndex, j, 0); |
| 41 | } |
| 42 | |
| 43 | concatDescriptor.SetViewOriginCoord(inputIndex, concatAxis, mergeDimOrigin); |
| 44 | mergeDimOrigin += inputTensorInfo.GetShape()[concatAxis]; |
| 45 | |
| 46 | for (unsigned int j = concatAxis + 1; j < inputRank; ++j) |
| 47 | { |
| 48 | concatDescriptor.SetViewOriginCoord(inputIndex, j, 0); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | void CalculateReducedOutputTensoInfo(const armnn::TensorInfo& inputTensorInfo, |
| 53 | const std::set<unsigned int>& axisSet, |
no test coverage detected