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

Method VerifyConstantLayerSetTensorInfo

src/armnn/Graph.cpp:622–643  ·  view source on GitHub ↗

For each ConstantLayer in Graph, ensures TensorInfo is set on all output slots. LayerValidationException thrown if no TensorInfo is set. @throws LayerValidationException

Source from the content-addressed store, hash-verified

620///
621/// @throws LayerValidationException
622void Graph::VerifyConstantLayerSetTensorInfo() const
623{
624 for (auto&& layer : TopologicalSort())
625 {
626 if (layer->GetType() == armnn::LayerType::Constant)
627 {
628 for (auto&& output: layer->GetOutputSlots())
629 {
630 if (!output.IsTensorInfoSet())
631 {
632 std::ostringstream message;
633 message << "Output slot TensorInfo not set on "
634 << GetLayerTypeAsCString(layer->GetType())
635 << " layer \""
636 << layer->GetName()
637 << "\"";
638 throw LayerValidationException(message.str());
639 }
640 }
641 }
642 }
643}
644
645void Graph::InferTensorInfos()
646{

Callers 1

OptimizeFunction · 0.80

Calls 6

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

Tested by

no test coverage detected