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

Method ParseTranspose

src/armnnDeserializer/Deserializer.cpp:3753–3774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3751}
3752
3753void IDeserializer::DeserializerImpl::ParseTranspose(GraphPtr graph, unsigned int layerIndex)
3754{
3755 CHECK_LAYERS(graph, 0, layerIndex);
3756
3757 auto dimsMapping = graph->layers()->Get(layerIndex)->layer_as_TransposeLayer()->descriptor()->dimMappings();
3758
3759 auto inputs = GetInputs(graph, layerIndex);
3760 CHECK_VALID_SIZE(inputs.size(), 1);
3761
3762 auto outputs = GetOutputs(graph, layerIndex);
3763 CHECK_VALID_SIZE(outputs.size(), 1);
3764 auto outputInfo = ToTensorInfo(outputs[0]);
3765
3766 auto layerName = GetLayerName(graph, layerIndex);
3767 const armnn::TransposeDescriptor descriptor(armnn::PermutationVector(dimsMapping->data(), dimsMapping->size()));
3768
3769 IConnectableLayer* layer = m_Network->AddTransposeLayer(descriptor, layerName.c_str());
3770 layer->GetOutputSlot(0).SetTensorInfo(outputInfo);
3771
3772 RegisterInputSlots(graph, layerIndex, layer);
3773 RegisterOutputSlots(graph, layerIndex, layer);
3774}
3775
3776void IDeserializer::DeserializerImpl::ParseTransposeConvolution2d(GraphPtr graph, unsigned int layerIndex)
3777{

Callers

nothing calls this directly

Calls 10

PermutationVectorClass · 0.85
AddTransposeLayerMethod · 0.80
GetOutputSlotMethod · 0.80
ToTensorInfoFunction · 0.70
GetLayerNameFunction · 0.50
GetMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
c_strMethod · 0.45
SetTensorInfoMethod · 0.45

Tested by

no test coverage detected