| 51 | } |
| 52 | |
| 53 | void 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 | |
| 78 | Layer::ImmutableConstantTensors FullyConnectedLayer::GetConstantTensorsByRef() const |
| 79 | { |
nothing calls this directly
no test coverage detected