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

Method ParseStandIn

src/armnnDeserializer/Deserializer.cpp:3869–3897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3867}
3868
3869void IDeserializer::DeserializerImpl::ParseStandIn(GraphPtr graph, unsigned int layerIndex)
3870{
3871 CHECK_LAYERS(graph, 0, layerIndex);
3872
3873 auto inputs = GetInputs(graph, layerIndex);
3874 auto outputs = GetOutputs(graph, layerIndex);
3875
3876 auto fbLayer = graph->layers()->Get(layerIndex)->layer_as_StandInLayer();
3877 auto fbDescriptor = fbLayer->descriptor();
3878
3879 armnn::StandInDescriptor descriptor;
3880 descriptor.m_NumInputs = fbDescriptor->numInputs();
3881 descriptor.m_NumOutputs = fbDescriptor->numOutputs();
3882
3883 CHECK_VALID_SIZE(inputs.size(), descriptor.m_NumInputs);
3884 CHECK_VALID_SIZE(outputs.size(), descriptor.m_NumOutputs);
3885
3886 const std::string layerName = GetLayerName(graph, layerIndex);
3887 armnn::IConnectableLayer* layer = m_Network->AddStandInLayer(descriptor, layerName.c_str());
3888
3889 for (unsigned int i = 0u; i < descriptor.m_NumOutputs; ++i)
3890 {
3891 armnn::TensorInfo outputInfo = ToTensorInfo(outputs[i]);
3892 layer->GetOutputSlot(i).SetTensorInfo(outputInfo);
3893 }
3894
3895 RegisterInputSlots(graph, layerIndex, layer);
3896 RegisterOutputSlots(graph, layerIndex, layer);
3897}
3898
3899armnn::UnidirectionalSequenceLstmDescriptor IDeserializer::DeserializerImpl::GetUnidirectionalSequenceLstmDescriptor(
3900 UnidirectionalSequenceLstmDescriptorPtr descriptor)

Callers

nothing calls this directly

Calls 8

AddStandInLayerMethod · 0.80
GetOutputSlotMethod · 0.80
ToTensorInfoFunction · 0.70
GetLayerNameFunction · 0.50
GetMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45
SetTensorInfoMethod · 0.45

Tested by

no test coverage detected