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

Method ParseDepthToSpace

src/armnnDeserializer/Deserializer.cpp:1656–1680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1654}
1655
1656void IDeserializer::DeserializerImpl::ParseDepthToSpace(GraphPtr graph, unsigned int layerIndex)
1657{
1658 CHECK_LAYERS(graph, 0, layerIndex);
1659
1660 auto inputs = GetInputs(graph, layerIndex);
1661 CHECK_VALID_SIZE(inputs.size(), 1);
1662
1663 auto outputs = GetOutputs(graph, layerIndex);
1664 CHECK_VALID_SIZE(outputs.size(), 1);
1665
1666 auto fbDescriptor = graph->layers()->Get(layerIndex)->layer_as_DepthToSpaceLayer()->descriptor();
1667
1668 armnn::DepthToSpaceDescriptor descriptor;
1669 descriptor.m_BlockSize = fbDescriptor->blockSize();
1670 descriptor.m_DataLayout = ToDataLayout(fbDescriptor->dataLayout());
1671
1672 auto layerName = GetLayerName(graph, layerIndex);
1673 IConnectableLayer* layer = m_Network->AddDepthToSpaceLayer(descriptor, layerName.c_str());
1674
1675 armnn::TensorInfo outputInfo = ToTensorInfo(outputs[0]);
1676 layer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1677
1678 RegisterInputSlots(graph, layerIndex, layer);
1679 RegisterOutputSlots(graph, layerIndex, layer);
1680}
1681
1682void IDeserializer::DeserializerImpl::ParseDepthwiseConvolution2d(GraphPtr graph, unsigned int layerIndex)
1683{

Callers

nothing calls this directly

Calls 9

ToDataLayoutFunction · 0.85
AddDepthToSpaceLayerMethod · 0.80
GetOutputSlotMethod · 0.80
ToTensorInfoFunction · 0.70
GetLayerNameFunction · 0.50
sizeMethod · 0.45
GetMethod · 0.45
c_strMethod · 0.45
SetTensorInfoMethod · 0.45

Tested by

no test coverage detected