aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/DetectionPostProcessLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/layers/DetectionPostProcessLayer.cpp')
-rw-r--r--src/armnn/layers/DetectionPostProcessLayer.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/armnn/layers/DetectionPostProcessLayer.cpp b/src/armnn/layers/DetectionPostProcessLayer.cpp
index e5bbeca424..b5086172dd 100644
--- a/src/armnn/layers/DetectionPostProcessLayer.cpp
+++ b/src/armnn/layers/DetectionPostProcessLayer.cpp
@@ -80,14 +80,16 @@ Layer::ConstantTensors DetectionPostProcessLayer::GetConstantTensorsByRef()
void DetectionPostProcessLayer::Accept(ILayerVisitor& visitor) const
{
- ConstTensor anchorTensor(m_Anchors->GetTensorInfo(), m_Anchors->GetConstTensor<void>());
+ ManagedConstTensorHandle managedAnchors(m_Anchors);
+ ConstTensor anchorTensor(managedAnchors.GetTensorInfo(), managedAnchors.Map());
visitor.VisitDetectionPostProcessLayer(this, GetParameters(), anchorTensor, GetName());
+ m_Anchors->Unmap();
}
void DetectionPostProcessLayer::ExecuteStrategy(IStrategy& strategy) const
{
- std::vector<armnn::ConstTensor> constTensors { {m_Anchors->GetTensorInfo(), m_Anchors->GetConstTensor<void>()} };
-
+ ManagedConstTensorHandle managedAnchors(m_Anchors);
+ std::vector<armnn::ConstTensor> constTensors { {managedAnchors.GetTensorInfo(), managedAnchors.Map()} };
strategy.ExecuteStrategy(this, GetParameters(), constTensors, GetName());
}