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

Method InferTensorInfos

src/armnn/Graph.cpp:645–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643}
644
645void Graph::InferTensorInfos()
646{
647 for (auto&& layer : TopologicalSort())
648 {
649 for (auto&& input : layer->GetInputSlots())
650 {
651 const IOutputSlot* source = input.GetConnectedOutputSlot();
652 if (source == NULL)
653 {
654 // Throws exception due to a layer input not being connected to an output slot.
655 // Verifies input slot weights and bias are set for FullyConnected layers.
656 ConstructErrorMessageForUnconnectedInputs(layer, input.GetSlotIndex());
657 }
658
659 if (!source->IsTensorInfoSet())
660 {
661 std::ostringstream message;
662 message << "Output slot TensorInfo not set on "
663 << GetLayerTypeAsCString(layer->GetType())
664 << " layer "
665 << std::quoted(layer->GetName());
666 throw LayerValidationException(message.str());
667 }
668 }
669
670 if (layer->m_ShapeInferenceMethod == ShapeInferenceMethod::ValidateOnly)
671 {
672 layer->ValidateTensorShapesFromInputs();
673 }
674 }
675}
676
677/// Throws exception due to a layer input not being connected to an output slot.
678/// Verifies weights and bias are set for layers on input slots 1

Calls 9

GetLayerTypeAsCStringFunction · 0.85
GetSlotIndexMethod · 0.80
IsTensorInfoSetMethod · 0.45
GetTypeMethod · 0.45
GetNameMethod · 0.45
strMethod · 0.45