blob: 22e0cf5495b96899d89255641b1866a665e7ce67 [file] [log] [blame]
Michalis Spyrou96f67692018-09-13 11:39:28 +01001/*
Michalis Spyrouf4643372019-11-29 16:17:13 +00002 * Copyright (c) 2018-2019 ARM Limited.
Michalis Spyrou96f67692018-09-13 11:39:28 +01003 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
Michalis Spyrouf4643372019-11-29 16:17:13 +000024#ifndef ARM_COMPUTE_GRAPH_YOLO_LAYER_NODE_H
25#define ARM_COMPUTE_GRAPH_YOLO_LAYER_NODE_H
Michalis Spyrou96f67692018-09-13 11:39:28 +010026
27#include "arm_compute/graph/INode.h"
28
29namespace arm_compute
30{
31namespace graph
32{
33/** YOLO Layer node */
34class YOLOLayerNode final : public INode
35{
36public:
37 /** Constructor
38 *
39 * @param[in] act_info Activation info
40 * @param[in] num_classes Number of classes to activate
41 */
42 YOLOLayerNode(ActivationLayerInfo act_info, int32_t num_classes);
43 /** Activation metadata accessor
44 *
45 * @return The activation info of the layer
46 */
47 ActivationLayerInfo activation_info() const;
48 /** Number of classes metadata accessor
49 *
50 * @return The number of classes to activate of the layer
51 */
52 int32_t num_classes() const;
53
54 // Inherited overridden methods:
55 NodeType type() const override;
56 bool forward_descriptors() override;
57 TensorDescriptor configure_output(size_t idx) const override;
58 void accept(INodeVisitor &v) override;
59
60private:
61 ActivationLayerInfo _act_info;
62 int32_t _num_classes;
63};
64} // namespace graph
65} // namespace arm_compute
Michalis Spyrouf4643372019-11-29 16:17:13 +000066#endif /* ARM_COMPUTE_GRAPH_YOLO_LAYER_NODE_H */