experimental_detectron_topkrois.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <cstdint>
8 #include <vector>
9 #include "ngraph/attribute_adapter.hpp"
10 #include "ngraph/op/op.hpp"
11 #include "ngraph/op/util/attr_types.hpp"
12 
13 namespace ngraph
14 {
15  namespace op
16  {
17  namespace v6
18  {
19  /// \brief An operation ExperimentalDetectronTopKROIs, according to the repository
20  /// is TopK operation applied to probabilities of input ROIs.
21  class NGRAPH_API ExperimentalDetectronTopKROIs : public Op
22  {
23  public:
24  NGRAPH_RTTI_DECLARATION;
25 
27  /// \brief Constructs a ExperimentalDetectronTopKROIs operation.
28  ///
29  /// \param input_rois Input rois
30  /// \param rois_probs Probabilities for input rois
31  /// \param max_rois Maximal numbers of output rois
33  const Output<Node>& rois_probs,
34  size_t max_rois = 0);
35 
36  void validate_and_infer_types() override;
37  bool visit_attributes(AttributeVisitor& visitor) override;
38 
39  std::shared_ptr<Node>
40  clone_with_new_inputs(const OutputVector& new_args) const override;
41 
42  size_t get_max_rois() const { return m_max_rois; }
43 
44  private:
45  size_t m_max_rois;
46  };
47  } // namespace v6
48  } // namespace op
49 } // namespace ngraph
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:59
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Root of all actual ops.
Definition: op.hpp:17
An operation ExperimentalDetectronTopKROIs, according to the repository is TopK operation applied to ...
Definition: experimental_detectron_topkrois.hpp:22
ExperimentalDetectronTopKROIs(const Output< Node > &input_rois, const Output< Node > &rois_probs, size_t max_rois=0)
Constructs a ExperimentalDetectronTopKROIs operation.
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16