| 191 | } |
| 192 | |
| 193 | void SetupConcatViewOrigin(const armnn::TensorInfo& inputTensorInfo, |
| 194 | armnn::OriginsDescriptor& concatDescriptor, |
| 195 | const unsigned int concatAxis, |
| 196 | unsigned int inputIndex, |
| 197 | unsigned int& mergeDimOrigin) |
| 198 | { |
| 199 | const uint32_t inputRank = concatDescriptor.GetNumDimensions(); |
| 200 | |
| 201 | // double check dimensions of the tensors |
| 202 | if (inputTensorInfo.GetNumDimensions() != inputRank) |
| 203 | { |
| 204 | throw armnn::ParseException("The number of dimensions for input tensors " |
| 205 | "of the concatenation operator should be: " + std::to_string(inputRank)); |
| 206 | } |
| 207 | |
| 208 | for (unsigned int j = 0; j < concatAxis; ++j) |
| 209 | { |
| 210 | concatDescriptor.SetViewOriginCoord(inputIndex, j, 0); |
| 211 | } |
| 212 | |
| 213 | concatDescriptor.SetViewOriginCoord(inputIndex, concatAxis, mergeDimOrigin); |
| 214 | mergeDimOrigin += inputTensorInfo.GetShape()[concatAxis]; |
| 215 | |
| 216 | for (unsigned int j = concatAxis + 1; j < inputRank; ++j) |
| 217 | { |
| 218 | concatDescriptor.SetViewOriginCoord(inputIndex, j, 0); |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | TfLiteStatus CreateOutputTensorShape(const armnn::TensorInfo& inputTensorInfo, |
| 223 | const std::vector<int32_t>& targetShape, |
no test coverage detected