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

Method ParseInstanceNormalization

src/armnnDeserializer/Deserializer.cpp:1909–1936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1907}
1908
1909void IDeserializer::DeserializerImpl::ParseInstanceNormalization(GraphPtr graph, unsigned int layerIndex)
1910{
1911 CHECK_LAYERS(graph, 0, layerIndex);
1912
1913 auto inputs = GetInputs(graph, layerIndex);
1914 CHECK_VALID_SIZE(inputs.size(), 1);
1915
1916 auto outputs = GetOutputs(graph, layerIndex);
1917 CHECK_VALID_SIZE(outputs.size(), 1);
1918
1919 auto fbLayer = graph->layers()->Get(layerIndex)->layer_as_InstanceNormalizationLayer();
1920 auto fbDescriptor = fbLayer->descriptor();
1921
1922 armnn::InstanceNormalizationDescriptor descriptor;
1923 descriptor.m_Gamma = fbDescriptor->gamma();
1924 descriptor.m_Beta = fbDescriptor->beta();
1925 descriptor.m_Eps = fbDescriptor->eps();
1926 descriptor.m_DataLayout = ToDataLayout(fbDescriptor->dataLayout());
1927
1928 const std::string layerName = GetLayerName(graph, layerIndex);
1929 const armnn::TensorInfo outputInfo = ToTensorInfo(outputs[0]);
1930
1931 IConnectableLayer* layer = m_Network->AddInstanceNormalizationLayer(descriptor, layerName.c_str());
1932 layer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1933
1934 RegisterInputSlots(graph, layerIndex, layer);
1935 RegisterOutputSlots(graph, layerIndex, layer);
1936}
1937
1938void IDeserializer::DeserializerImpl::ParseL2Normalization(GraphPtr graph, unsigned int layerIndex)
1939{

Callers

nothing calls this directly

Calls 9

ToDataLayoutFunction · 0.85
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