| 203 | } |
| 204 | |
| 205 | void SplitterLayer::ValidateTensorShapesFromInputs() |
| 206 | { |
| 207 | std::for_each(BeginOutputSlots(), EndOutputSlots(), [&](OutputSlot& outputSlot) |
| 208 | { |
| 209 | VerifyShapeInferenceType(outputSlot.GetTensorInfo().GetShape(), m_ShapeInferenceMethod); |
| 210 | }); |
| 211 | |
| 212 | std::vector<TensorShape> views; |
| 213 | for (unsigned int viewIdx = 0; viewIdx < m_Param.GetNumViews(); viewIdx++) |
| 214 | { |
| 215 | const uint32_t* sizes = m_Param.GetViewSizes(viewIdx); |
| 216 | views.push_back(TensorShape(m_Param.GetNumDimensions(), sizes)); |
| 217 | } |
| 218 | |
| 219 | auto inferredShapes = InferOutputShapes(views); |
| 220 | |
| 221 | if (inferredShapes.size() != m_Param.GetNumViews()) |
| 222 | { |
| 223 | throw armnn::LayerValidationException("inferredShapes' size and m_NumViews do not match (\"" |
| 224 | + std::to_string(inferredShapes.size()) + |
| 225 | "\" vs \"" |
| 226 | + std::to_string(m_Param.GetNumViews()) + "\")"); |
| 227 | } |
| 228 | |
| 229 | for (unsigned int viewIdx = 0; viewIdx < m_Param.GetNumViews(); viewIdx++) |
| 230 | { |
| 231 | ValidateAndCopyShape(GetOutputSlot(viewIdx).GetTensorInfo().GetShape(), |
| 232 | inferredShapes[viewIdx], |
| 233 | m_ShapeInferenceMethod, |
| 234 | "SplitterLayer", |
| 235 | viewIdx); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | void SplitterLayer::ExecuteStrategy(IStrategy& strategy) const |
| 240 | { |
nothing calls this directly
no test coverage detected