From 8174f3629d4b0dc0af7a75d2a201d756bc9e9d5b Mon Sep 17 00:00:00 2001 From: ruoyan01 Date: Tue, 4 Dec 2018 18:24:08 +0000 Subject: [PATCH] IVGCVSW-2276: Remove the input swizzling in ParseLrn Change-Id: If5ef3dc426bd6fa5aab342dcece6e99f86e65dba --- src/armnnTfParser/TfParser.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/armnnTfParser/TfParser.cpp b/src/armnnTfParser/TfParser.cpp index 73bdb65..31f0b42 100644 --- a/src/armnnTfParser/TfParser.cpp +++ b/src/armnnTfParser/TfParser.cpp @@ -2078,19 +2078,16 @@ ParsedTfOperationPtr TfParser::ParseLrn(const tensorflow::NodeDef& nodeDef, cons normalizationDescriptor.m_Beta = ReadMandatoryNodeFloatAttribute(nodeDef, "beta"); normalizationDescriptor.m_K = ReadMandatoryNodeFloatAttribute(nodeDef, "bias"); normalizationDescriptor.m_NormSize = ReadMandatoryNodeUint32Attribute(nodeDef, "depth_radius"); + normalizationDescriptor.m_DataLayout = armnn::DataLayout::NHWC; // The window size must be an odd value. For a window size of (2 * n + 1), TensorFlow defines depth_radius = n. normalizationDescriptor.m_NormSize = normalizationDescriptor.m_NormSize * 2 + 1; IOutputSlot& prevLayerOutputSlot = inputs[0].m_IndexedValue->ResolveArmnnOutputSlot(inputs[0].m_Index); - IConnectableLayer* layer = m_Network->AddNormalizationLayer(normalizationDescriptor, nodeDef.name().c_str()); - - const TensorInfo permutedInfo = armnnUtils::Permuted(prevLayerOutputSlot.GetTensorInfo(), NHWCToArmNN); - layer->GetOutputSlot(0).SetTensorInfo(permutedInfo); - - layer = SwizzleInDeswizzleOut(*m_Network, prevLayerOutputSlot, *layer, nodeDef.name()); + prevLayerOutputSlot.Connect(layer->GetInputSlot(0)); + layer->GetOutputSlot(0).SetTensorInfo(prevLayerOutputSlot.GetTensorInfo()); return std::make_unique(this, nodeDef, layer); } -- 2.7.4