reorg_yolo.hpp
1 //*****************************************************************************
2 // Copyright 2017-2020 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //*****************************************************************************
16 
17 #pragma once
18 
19 #include "ngraph/op/op.hpp"
20 
21 namespace ngraph
22 {
23  namespace op
24  {
25  namespace v0
26  {
27  class NGRAPH_API ReorgYolo : public Op
28  {
29  public:
30  static constexpr NodeTypeInfo type_info{"ReorgYolo", 0};
31  const NodeTypeInfo& get_type_info() const override { return type_info; }
32  ReorgYolo() = default;
33  /// \brief Constructs a ReorgYolo operation
34  ///
35  /// \param input Input
36  /// \param strides Stride to reorganize input by
37  ReorgYolo(const Output<Node>& input, const Strides& strides);
38 
39  void validate_and_infer_types() override;
40 
41  virtual bool visit_attributes(AttributeVisitor& visitor) override;
42 
43  virtual std::shared_ptr<Node>
44  clone_with_new_inputs(const OutputVector& new_args) const override;
45 
46  Strides get_strides() const { return m_strides; }
47  private:
48  Strides m_strides;
49  };
50  }
51  using v0::ReorgYolo;
52  }
53 }
ngraph::op::v0::ReorgYolo::validate_and_infer_types
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
ngraph::op::v0::ReorgYolo::get_type_info
const NodeTypeInfo & get_type_info() const override
Definition: reorg_yolo.hpp:31
ngraph::op::v0::ReorgYolo::ReorgYolo
ReorgYolo(const Output< Node > &input, const Strides &strides)
Constructs a ReorgYolo operation.
ngraph
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28
ngraph::AttributeVisitor
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:70
ngraph::op::v0::ReorgYolo
Definition: reorg_yolo.hpp:28
ngraph::op::Op
Root of all actual ops.
Definition: op.hpp:29