diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-02-04 11:46:26 +0000 |
---|---|---|
committer | Nina Drozd <nina.drozd@arm.com> | 2019-02-08 10:07:20 +0000 |
commit | 6d302bfb568962f3b6b6f012b260ce54f22d36a0 (patch) | |
tree | 86147d527e36751392539f363e5aa702e49f2fc7 /src/armnn/layers/DetectionPostProcessLayer.cpp | |
parent | 61980d472006abdf3778d23903fb3bec5916f1f2 (diff) | |
download | armnn-6d302bfb568962f3b6b6f012b260ce54f22d36a0.tar.gz |
IVGCVSW-2559 End to end tests for Detection PostProcess
* end to end tests for Detection PostProcess float and uint8
* add anchors to AddDetectionPostProcessLayer
* add anchors to VisitDetectionPostProcessLayer
* refactor code
Change-Id: I3c5a9a4a60b74c2246b4a27692bbf3c235163f90
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Diffstat (limited to 'src/armnn/layers/DetectionPostProcessLayer.cpp')
-rw-r--r-- | src/armnn/layers/DetectionPostProcessLayer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/armnn/layers/DetectionPostProcessLayer.cpp b/src/armnn/layers/DetectionPostProcessLayer.cpp index 3eea198f90..289cee0bd7 100644 --- a/src/armnn/layers/DetectionPostProcessLayer.cpp +++ b/src/armnn/layers/DetectionPostProcessLayer.cpp @@ -24,12 +24,15 @@ std::unique_ptr<IWorkload> DetectionPostProcessLayer::CreateWorkload(const armnn const armnn::IWorkloadFactory& factory) const { DetectionPostProcessQueueDescriptor descriptor; + descriptor.m_Anchors = m_Anchors.get(); return factory.CreateDetectionPostProcess(descriptor, PrepInfoAndDesc(descriptor, graph)); } DetectionPostProcessLayer* DetectionPostProcessLayer::Clone(Graph& graph) const { - return CloneBase<DetectionPostProcessLayer>(graph, m_Param, GetName()); + auto layer = CloneBase<DetectionPostProcessLayer>(graph, m_Param, GetName()); + layer->m_Anchors = m_Anchors ? std::make_unique<ScopedCpuTensorHandle>(*m_Anchors) : nullptr; + return std::move(layer); } void DetectionPostProcessLayer::ValidateTensorShapesFromInputs() @@ -72,7 +75,8 @@ Layer::ConstantTensors DetectionPostProcessLayer::GetConstantTensorsByRef() void DetectionPostProcessLayer::Accept(ILayerVisitor& visitor) const { - visitor.VisitDetectionPostProcessLayer(this, GetParameters(), GetName()); + ConstTensor anchorTensor(m_Anchors->GetTensorInfo(), m_Anchors->GetConstTensor<void>()); + visitor.VisitDetectionPostProcessLayer(this, GetParameters(), anchorTensor, GetName()); } } // namespace armnn |