diff options
author | ruoyan01 <ruomei.yan@arm.com> | 2018-12-04 18:24:08 +0000 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2018-12-05 15:41:38 +0000 |
commit | 8174f3629d4b0dc0af7a75d2a201d756bc9e9d5b (patch) | |
tree | 88a2f9be04e2170da06eca3f122df949f0491b70 /src | |
parent | 075c7504b6d6ecd50fa61ca53ab1bcccc8865843 (diff) | |
download | armnn-8174f3629d4b0dc0af7a75d2a201d756bc9e9d5b.tar.gz |
IVGCVSW-2276: Remove the input swizzling in ParseLrn
Change-Id: If5ef3dc426bd6fa5aab342dcece6e99f86e65dba
Diffstat (limited to 'src')
-rw-r--r-- | src/armnnTfParser/TfParser.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/armnnTfParser/TfParser.cpp b/src/armnnTfParser/TfParser.cpp index 73bdb656b5..31f0b42c0d 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<SingleLayerParsedTfOperation>(this, nodeDef, layer); } |