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

Method GetOutputTensorInfo

src/armnn/LoadedNetwork.cpp:644–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644TensorInfo LoadedNetwork::GetOutputTensorInfo(LayerBindingId layerId) const
645{
646 for (auto&& outputLayer : m_OptimizedNetwork->pOptimizedNetworkImpl->GetGraph().GetOutputLayers())
647 {
648 if (outputLayer->GetNumInputSlots() != 1)
649 {
650 throw armnn::GraphValidationException("Output layer should have exactly 1 input slot");
651 }
652
653 if (!outputLayer->GetInputSlot(0).GetConnection())
654 {
655 throw armnn::GraphValidationException("Input slot on Output layer must be connected");
656 }
657
658 if (outputLayer->GetBindingId() == layerId)
659 {
660 return outputLayer->GetInputSlot(0).GetTensorInfo();
661 }
662 }
663
664 throw InvalidArgumentException(fmt::format("No output layer is associated with id {}", layerId));
665}
666
667const IWorkloadFactory& LoadedNetwork::GetWorkloadFactory(const Layer& layer) const
668{

Callers

nothing calls this directly

Calls 7

formatEnum · 0.85
GetOutputLayersMethod · 0.80
GetConnectionMethod · 0.60
GetNumInputSlotsMethod · 0.45
GetBindingIdMethod · 0.45

Tested by

no test coverage detected