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

Method ValidateTensorShapesFromInputs

src/armnn/layers/FullyConnectedLayer.cpp:53–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void FullyConnectedLayer::ValidateTensorShapesFromInputs()
54{
55 const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
56
57 VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
58
59 std::vector<TensorShape> inferredShapes = InferOutputShapes(
60 {GetInputSlot(0).GetTensorInfo().GetShape(),
61 GetInputSlot(1).GetTensorInfo().GetShape()});
62
63 if (inferredShapes.size() != 1)
64 {
65 throw armnn::LayerValidationException("inferredShapes has "
66 + std::to_string(inferredShapes.size()) +
67 " elements - should only have 1.");
68 }
69
70 if (inferredShapes[0].GetDimensionality() != Dimensionality::Specified)
71 {
72 throw armnn::LayerValidationException("inferredShapes' dimensionality has not been specified.");
73 }
74
75 ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "FullyConnectedLayer");
76}
77
78Layer::ImmutableConstantTensors FullyConnectedLayer::GetConstantTensorsByRef() const
79{

Callers

nothing calls this directly

Calls 5

GetDimensionalityMethod · 0.80
to_stringFunction · 0.50
GetShapeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected