| 2005 | } |
| 2006 | |
| 2007 | void TfLiteParserImpl::ParseL2Normalization(size_t subgraphIndex, size_t operatorIndex) |
| 2008 | { |
| 2009 | CHECK_MODEL(m_Model, subgraphIndex, operatorIndex); |
| 2010 | |
| 2011 | auto inputs = GetInputs(m_Model, subgraphIndex, operatorIndex); |
| 2012 | CHECK_VALID_SIZE(inputs.size(), 1); |
| 2013 | |
| 2014 | auto outputs = GetOutputs(m_Model, subgraphIndex, operatorIndex); |
| 2015 | CHECK_VALID_SIZE(outputs.size(), 1); |
| 2016 | |
| 2017 | L2NormalizationDescriptor desc; |
| 2018 | desc.m_DataLayout = armnn::DataLayout::NHWC; |
| 2019 | auto layerName = fmt::format("L2Normalization:{}:{}", subgraphIndex, operatorIndex); |
| 2020 | IConnectableLayer* layer = m_Network->AddL2NormalizationLayer(desc, layerName.c_str()); |
| 2021 | |
| 2022 | if (!layer) |
| 2023 | { |
| 2024 | throw NullPointerException(fmt::format("Layer {} pointer is null {}", |
| 2025 | operatorIndex, CHECK_LOCATION().AsString())); |
| 2026 | } |
| 2027 | |
| 2028 | armnn::TensorInfo outputTensorInfo = OutputTensorInfoFromInputs(subgraphIndex, operatorIndex, layer, 0, {0}); |
| 2029 | layer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo); |
| 2030 | |
| 2031 | auto inputTensorIndexes = AsUnsignedVector(GetInputTensorIds(m_Model, subgraphIndex, operatorIndex)); |
| 2032 | RegisterInputSlots(subgraphIndex, operatorIndex, layer, {inputTensorIndexes[0]}); |
| 2033 | |
| 2034 | auto outputTensorIndexes = AsUnsignedVector(GetOutputTensorIds(m_Model, subgraphIndex, operatorIndex)); |
| 2035 | RegisterOutputSlots(subgraphIndex, operatorIndex, layer, {outputTensorIndexes[0]}); |
| 2036 | } |
| 2037 | |
| 2038 | void TfLiteParserImpl::ParseMaxPool2D(size_t subgraphIndex, size_t operatorIndex) |
| 2039 | { |
nothing calls this directly
no test coverage detected