experimental_detectron_roi_feature.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <cstddef>
8 #include <cstdint>
9 #include <vector>
10 #include "ngraph/attribute_adapter.hpp"
11 #include "ngraph/op/op.hpp"
12 #include "ngraph/op/util/attr_types.hpp"
13 
14 namespace ngraph
15 {
16  namespace op
17  {
18  namespace v6
19  {
20  /// \brief An operation ExperimentalDetectronROIFeatureExtractor
21  /// is the ROIAlign operation applied over a feature pyramid.
22  class NGRAPH_API ExperimentalDetectronROIFeatureExtractor : public Op
23  {
24  public:
25  NGRAPH_RTTI_DECLARATION;
26 
27  /// \brief Structure that specifies attributes of the operation
28  struct Attributes
29  {
30  int64_t output_size;
31  int64_t sampling_ratio;
32  std::vector<int64_t> pyramid_scales;
33  bool aligned;
34  };
35 
37  /// \brief Constructs a ExperimentalDetectronROIFeatureExtractor operation.
38  ///
39  /// \param args Inputs of ExperimentalDetectronROIFeatureExtractor
40  /// \param attrs Operation attributes
41  ExperimentalDetectronROIFeatureExtractor(const OutputVector& args,
42  const Attributes& attrs);
43 
44  /// \brief Constructs a ExperimentalDetectronROIFeatureExtractor operation.
45  ///
46  /// \param args Inputs of ExperimentalDetectronROIFeatureExtractor
47  /// \param attrs Operation attributes
49  const Attributes& attrs);
50  bool visit_attributes(AttributeVisitor& visitor) override;
51 
52  void validate_and_infer_types() override;
53 
54  std::shared_ptr<Node>
55  clone_with_new_inputs(const OutputVector& new_args) const override;
56  /// \brief Returns attributes of the operation.
57  const Attributes& get_attrs() const { return m_attrs; }
58 
59  private:
60  Attributes m_attrs;
61  };
62  } // namespace v6
63  } // namespace op
64 } // namespace ngraph
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:59
Root of all actual ops.
Definition: op.hpp:17
An operation ExperimentalDetectronROIFeatureExtractor is the ROIAlign operation applied over a featur...
Definition: experimental_detectron_roi_feature.hpp:23
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
ExperimentalDetectronROIFeatureExtractor(const NodeVector &args, const Attributes &attrs)
Constructs a ExperimentalDetectronROIFeatureExtractor operation.
const Attributes & get_attrs() const
Returns attributes of the operation.
Definition: experimental_detectron_roi_feature.hpp:57
ExperimentalDetectronROIFeatureExtractor(const OutputVector &args, const Attributes &attrs)
Constructs a ExperimentalDetectronROIFeatureExtractor operation.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
Structure that specifies attributes of the operation.
Definition: experimental_detectron_roi_feature.hpp:29