aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/DetectionPostProcessLayer.cpp
blob: 78589229e6c17b81aa7fd01981fef051f65b0ab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#include "DetectionPostProcessLayer.hpp"

#include "LayerCloneBase.hpp"

#include <armnn/TypesUtils.hpp>
#include <backendsCommon/WorkloadData.hpp>
#include <backendsCommon/WorkloadFactory.hpp>

namespace armnn
{

DetectionPostProcessLayer::DetectionPostProcessLayer(const DetectionPostProcessDescriptor& param, const char* name)
    : LayerWithParameters(2, 4, LayerType::DetectionPostProcess, param, name)
{
}

std::unique_ptr<IWorkload> DetectionPostProcessLayer::CreateWorkload(const armnn::Graph& graph,
                                                                     const armnn::IWorkloadFactory& factory) const
{
    DetectionPostProcessQueueDescriptor descriptor;
    return factory.CreateDetectionPostProcess(descriptor, PrepInfoAndDesc(descriptor, graph));
}

DetectionPostProcessLayer* DetectionPostProcessLayer::Clone(Graph& graph) const
{
    return CloneBase<DetectionPostProcessLayer>(graph, m_Param, GetName());
}

void DetectionPostProcessLayer::ValidateTensorShapesFromInputs()
{
    VerifyLayerConnections(2, CHECK_LOCATION());
}

void DetectionPostProcessLayer::Accept(ILayerVisitor& visitor) const
{
    visitor.VisitDetectionPostProcessLayer(this, GetParameters(), GetName());
}

} // namespace armnn