MCPcopy Create free account
hub / github.com/ARM-software/armnn / ValidateTensorShapesFromInputs

Method ValidateTensorShapesFromInputs

src/armnn/layers/SliceLayer.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void SliceLayer::ValidateTensorShapesFromInputs()
38{
39 VerifyLayerConnections(1, CHECK_LOCATION());
40
41 const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
42
43 VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
44
45 auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
46
47 if (inferredShapes.size() != 1)
48 {
49 throw armnn::LayerValidationException("inferredShapes has "
50 + std::to_string(inferredShapes.size()) +
51 " elements - should only have 1.");
52 }
53
54 ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "SliceLayer");
55}
56
57std::vector<TensorShape> SliceLayer::InferOutputShapes(const std::vector<TensorShape>& inputShapes) const
58{

Callers

nothing calls this directly

Calls 4

to_stringFunction · 0.50
GetShapeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected