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

Method ValidateTensorShapesFromInputs

src/armnn/layers/NormalizationLayer.cpp:34–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

to_stringFunction · 0.50
GetShapeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected