Moved operations D-F to ov namespace (#7341)
* Moved ngraph::Node to ov namespace * Fixed code style * Fixed VPU * Fixed GNA * Fixed tests * Added aliases for backward compatibility * Fix clDNN * Try to fix build * Fixed comment * Renamed RTTI macros * Moved op utils to ov namespace * Fixed ngraph library build * Fixed unit-tests * Changed src folder * Fixed recurrent_sequence * Changed low latency * Fixed serialize * Fixed ieFuncTests * Try to fix windows * Remove custom operator<< from tests * Fixed build * Moved operations from A to ov namespace * Moved operations from B and C to ov namespace * Moved operations D-F to ov namespace * Update ngraph/core/src/op/embeddingbag_offsets_sum.cpp Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com> * Update ngraph/core/src/op/embeddingbag_packedsum.cpp Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com> Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>
This commit is contained in:
73 files changed
+1580
-1165
No files matched your search
@@ -8,168 +8,16 @@
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "ngraph/op/util/deformable_convolution_base.hpp"
|
||||
#include "openvino/op/deformable_convolution.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
/// \brief DeformableConvolution operation.
|
||||
class NGRAPH_API DeformableConvolution : public op::util::DeformableConvolutionBase {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs a conversion operation.
|
||||
DeformableConvolution() = default;
|
||||
/// \brief Constructs a conversion operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
/// \param offsets Node producing the deformable values tensor.
|
||||
/// \param filters Node producing the filters(kernels) tensor with OIZYX
|
||||
/// layout.
|
||||
/// \param strides Convolution strides.
|
||||
/// \param pads_begin Amount of padding to be added to the beginning along
|
||||
/// each axis. For example in case of a 2D input the value
|
||||
/// of (1, 2) means that 1 element will be added to the
|
||||
/// top and 2 elements to the left.
|
||||
/// \param pads_end Amount of padding to be added to the end along each
|
||||
/// axis.
|
||||
/// \param dilations The distance in width and height between the weights
|
||||
/// in the filters tensor.
|
||||
/// \param auto_pad Specifies how the automatic calculation of padding
|
||||
/// should be done.
|
||||
/// \param group The number of groups which both output and input
|
||||
/// should be split into.
|
||||
/// \param deformable_group The number of groups which deformable values and
|
||||
/// output should be split into along the channel axis.
|
||||
DeformableConvolution(const Output<Node>& arg,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& filters,
|
||||
const Strides& strides,
|
||||
const CoordinateDiff& pads_begin,
|
||||
const CoordinateDiff& pads_end,
|
||||
const Strides& dilations,
|
||||
const PadType& auto_pad = PadType::EXPLICIT,
|
||||
const int64_t group = 1,
|
||||
const int64_t deformable_group = 1);
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
using ov::op::v1::DeformableConvolution;
|
||||
} // namespace v1
|
||||
|
||||
namespace v8 {
|
||||
class NGRAPH_API DeformableConvolution : public op::util::DeformableConvolutionBase {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs a conversion operation.
|
||||
DeformableConvolution() = default;
|
||||
/// \brief Constructs a conversion operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
/// \param offsets Node producing the deformable values tensor.
|
||||
/// \param filters Node producing the filters(kernels) tensor with OIZYX
|
||||
/// layout.
|
||||
/// \param strides Convolution strides.
|
||||
/// \param pads_begin Amount of padding to be added to the beginning along
|
||||
/// each axis. For example in case of a 2D input the value
|
||||
/// of (1, 2) means that 1 element will be added to the
|
||||
/// top and 2 elements to the left.
|
||||
/// \param pads_end Amount of padding to be added to the end along each
|
||||
/// axis.
|
||||
/// \param dilations The distance in width and height between the weights
|
||||
/// in the filters tensor.
|
||||
/// \param auto_pad Specifies how the automatic calculation of padding
|
||||
/// should be done.
|
||||
/// \param group The number of groups which both output and input
|
||||
/// should be split into.
|
||||
/// \param deformable_group The number of groups which deformable values and
|
||||
/// output should be split into along the channel axis.
|
||||
/// \param bilinear_interpolation_pad
|
||||
/// The flag that determines the mode of bilinear
|
||||
/// interpolation execution.
|
||||
/// If the flag is `true` and the sampling location is
|
||||
/// within one pixel outside of the feature map boundary,
|
||||
/// then bilinear interpolation is performed on the zero
|
||||
/// padded feature map. If the flag is `false` and the
|
||||
/// sampling location is within one pixel outside of the
|
||||
/// feature map boundary, then the sampling location
|
||||
/// shifts to the inner boundary of the feature map.`
|
||||
DeformableConvolution(const Output<Node>& arg,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& filters,
|
||||
const Strides& strides,
|
||||
const CoordinateDiff& pads_begin,
|
||||
const CoordinateDiff& pads_end,
|
||||
const Strides& dilations,
|
||||
const PadType& auto_pad = PadType::EXPLICIT,
|
||||
const int64_t group = 1,
|
||||
const int64_t deformable_group = 1,
|
||||
const bool bilinear_interpolation_pad = false);
|
||||
|
||||
/// \brief Constructs a conversion operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
/// \param offsets Node producing the deformable values tensor.
|
||||
/// \param filters Node producing the filters(kernels) tensor with OIZYX
|
||||
/// layout.
|
||||
/// \param mask Node producing the mask(mask) tensor.
|
||||
/// \param strides Convolution strides.
|
||||
/// \param pads_begin Amount of padding to be added to the beginning along
|
||||
/// each axis. For example in case of a 2D input the value
|
||||
/// of (1, 2) means that 1 element will be added to the
|
||||
/// top and 2 elements to the left.
|
||||
/// \param pads_end Amount of padding to be added to the end along each
|
||||
/// axis.
|
||||
/// \param dilations The distance in width and height between the weights
|
||||
/// in the filters tensor.
|
||||
/// \param auto_pad Specifies how the automatic calculation of padding
|
||||
/// should be done.
|
||||
/// \param group The number of groups which both output and input
|
||||
/// should be split into.
|
||||
/// \param deformable_group The number of groups which deformable values and
|
||||
/// output should be split into along the channel axis.
|
||||
/// \param bilinear_interpolation_pad
|
||||
/// The flag that determines the mode of bilinear
|
||||
/// interpolation execution.
|
||||
/// If the flag is `true` and the sampling location is
|
||||
/// within one pixel outside of the feature map boundary,
|
||||
/// then bilinear interpolation is performed on the zero
|
||||
/// padded feature map. If the flag is `false` and the
|
||||
/// sampling location is within one pixel outside of the
|
||||
/// feature map boundary, then the sampling location
|
||||
/// shifts to the inner boundary of the feature map.
|
||||
DeformableConvolution(const Output<Node>& arg,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& filters,
|
||||
const Output<Node>& mask,
|
||||
const Strides& strides,
|
||||
const CoordinateDiff& pads_begin,
|
||||
const CoordinateDiff& pads_end,
|
||||
const Strides& dilations,
|
||||
const PadType& auto_pad = PadType::EXPLICIT,
|
||||
const int64_t group = 1,
|
||||
const int64_t deformable_group = 1,
|
||||
const bool bilinear_interpolation_pad = false);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
|
||||
bool has_evaluate() const override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool get_bilinear_interpolation_pad() const {
|
||||
return m_bilinear_interpolation_pad;
|
||||
}
|
||||
|
||||
void set_bilinear_interpolation_pad(const bool bilinear_interpolation_pad) {
|
||||
m_bilinear_interpolation_pad = bilinear_interpolation_pad;
|
||||
}
|
||||
|
||||
private:
|
||||
bool m_bilinear_interpolation_pad;
|
||||
};
|
||||
using ov::op::v8::DeformableConvolution;
|
||||
} // namespace v8
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -5,103 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "openvino/op/deformable_psroi_pooling.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
class NGRAPH_API DeformablePSROIPooling : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
DeformablePSROIPooling() = default;
|
||||
/// \brief Constructs a DeformablePSROIPooling operation
|
||||
///
|
||||
/// \param input Input tensor with position sensitive score maps
|
||||
/// \param coords Input tensor with list of five element tuples
|
||||
/// describing ROI coordinates
|
||||
/// \param offsets Input tensor with transformation values
|
||||
/// \param output_dim Pooled output channel number
|
||||
/// \param group_size Number of horizontal bins per row to divide ROI area,
|
||||
/// it defines output width and height
|
||||
/// \param spatial_scale Multiplicative spatial scale factor to translate ROI
|
||||
/// coordinates from their input scale to the scale used when
|
||||
/// pooling
|
||||
/// \param mode Specifies mode for pooling.
|
||||
/// \param spatial_bins_x Specifies numbers of bins to divide ROI single
|
||||
/// bin over width
|
||||
/// \param spatial_bins_y Specifies numbers of bins to divide ROI single
|
||||
/// bin over height
|
||||
/// \param no_trans The flag that specifies whenever third input exists
|
||||
/// and contains transformation (offset) values
|
||||
/// \param trans_std The value that all transformation (offset) values are
|
||||
/// multiplied with
|
||||
/// \param part_size The number of parts the output tensor spatial dimensions
|
||||
/// are divided into. Basically it is the height
|
||||
/// and width of the third input
|
||||
DeformablePSROIPooling(const Output<Node>& input,
|
||||
const Output<Node>& coords,
|
||||
const Output<Node>& offsets,
|
||||
const int64_t output_dim,
|
||||
const float spatial_scale,
|
||||
const int64_t group_size = 1,
|
||||
const std::string mode = "bilinear_deformable",
|
||||
int64_t spatial_bins_x = 1,
|
||||
int64_t spatial_bins_y = 1,
|
||||
float trans_std = 1,
|
||||
int64_t part_size = 1);
|
||||
|
||||
DeformablePSROIPooling(const Output<Node>& input,
|
||||
const Output<Node>& coords,
|
||||
const int64_t output_dim,
|
||||
const float spatial_scale,
|
||||
const int64_t group_size = 1,
|
||||
const std::string mode = "bilinear_deformable",
|
||||
int64_t spatial_bins_x = 1,
|
||||
int64_t spatial_bins_y = 1,
|
||||
float trans_std = 1,
|
||||
int64_t part_size = 1);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
int64_t get_output_dim() const {
|
||||
return m_output_dim;
|
||||
}
|
||||
int64_t get_group_size() const {
|
||||
return m_group_size;
|
||||
}
|
||||
float get_spatial_scale() const {
|
||||
return m_spatial_scale;
|
||||
}
|
||||
const std::string& get_mode() const {
|
||||
return m_mode;
|
||||
}
|
||||
int64_t get_spatial_bins_x() const {
|
||||
return m_spatial_bins_x;
|
||||
}
|
||||
int64_t get_spatial_bins_y() const {
|
||||
return m_spatial_bins_y;
|
||||
}
|
||||
float get_trans_std() const {
|
||||
return m_trans_std;
|
||||
}
|
||||
int64_t get_part_size() const {
|
||||
return m_part_size;
|
||||
}
|
||||
|
||||
private:
|
||||
int64_t m_output_dim;
|
||||
float m_spatial_scale;
|
||||
int64_t m_group_size = 1;
|
||||
std::string m_mode = "bilinear_deformable";
|
||||
int64_t m_spatial_bins_x = 1;
|
||||
int64_t m_spatial_bins_y = 1;
|
||||
float m_trans_std = 1.f;
|
||||
int64_t m_part_size = 1;
|
||||
};
|
||||
using ov::op::v1::DeformablePSROIPooling;
|
||||
} // namespace v1
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -6,76 +6,13 @@
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "openvino/op/depth_to_space.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief DepthToSpace permutes data from the depth dimension of the input blob into
|
||||
/// spatial dimensions.
|
||||
///
|
||||
/// \note Values from the depth dimension (assuming NCHW layout) are moved in
|
||||
/// spatial blocks to the height and width dimensions.
|
||||
///
|
||||
/// Output node produces a tensor with shape:
|
||||
/// [N, C/(blocksize * blocksize), H * blocksize, W * blocksize]
|
||||
class NGRAPH_API DepthToSpace : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
enum class DepthToSpaceMode {
|
||||
// The input depth is divided to [block_size, ..., block_size, new_depth]
|
||||
BLOCKS_FIRST,
|
||||
// The input depth is divided to [new_depth, block_size, ..., block_size]
|
||||
DEPTH_FIRST
|
||||
};
|
||||
|
||||
DepthToSpace() = default;
|
||||
/// \brief Constructs a DepthToSpace operation.
|
||||
///
|
||||
/// \param data Node producing the input tensor
|
||||
/// \param mode Specifies how the input depth dimension is split to block
|
||||
/// coordinates
|
||||
/// \param block_size The size of the block of values to be moved
|
||||
DepthToSpace(const Output<Node>& data, const DepthToSpaceMode& mode, std::size_t block_size = 1);
|
||||
|
||||
DepthToSpace(const Output<Node>& data, const std::string& mode, std::size_t block_size = 1);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::size_t get_block_size() const {
|
||||
return m_blocksize;
|
||||
}
|
||||
DepthToSpaceMode get_mode() const {
|
||||
return m_mode;
|
||||
}
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
void validate_and_infer_types() override;
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
|
||||
protected:
|
||||
std::size_t m_blocksize;
|
||||
DepthToSpaceMode m_mode;
|
||||
};
|
||||
using ov::op::v0::DepthToSpace;
|
||||
} // namespace v0
|
||||
using v0::DepthToSpace;
|
||||
} // namespace op
|
||||
|
||||
NGRAPH_API
|
||||
std::ostream& operator<<(std::ostream& s, const op::v0::DepthToSpace::DepthToSpaceMode& type);
|
||||
} // namespace ngraph
|
||||
namespace ov {
|
||||
|
||||
template <>
|
||||
class NGRAPH_API AttributeAdapter<ngraph::op::v0::DepthToSpace::DepthToSpaceMode>
|
||||
: public EnumAttributeAdapterBase<ngraph::op::v0::DepthToSpace::DepthToSpaceMode> {
|
||||
public:
|
||||
AttributeAdapter(ngraph::op::v0::DepthToSpace::DepthToSpaceMode& value)
|
||||
: EnumAttributeAdapterBase<ngraph::op::v0::DepthToSpace::DepthToSpaceMode>(value) {}
|
||||
|
||||
static constexpr DiscreteTypeInfo type_info{"AttributeAdapter<op::v0::DepthToSpace::DepthToSpaceMode>", 0};
|
||||
const DiscreteTypeInfo& get_type_info() const override {
|
||||
return type_info;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ov
|
||||
@@ -5,74 +5,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "openvino/op/detection_output.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
struct DetectionOutputAttrs {
|
||||
int num_classes;
|
||||
int background_label_id = 0;
|
||||
int top_k = -1;
|
||||
bool variance_encoded_in_target = false;
|
||||
std::vector<int> keep_top_k;
|
||||
std::string code_type = std::string{"caffe.PriorBoxParameter.CORNER"};
|
||||
bool share_location = true;
|
||||
float nms_threshold;
|
||||
float confidence_threshold = 0;
|
||||
bool clip_after_nms = false;
|
||||
bool clip_before_nms = false;
|
||||
bool decrease_label_id = false;
|
||||
bool normalized = false;
|
||||
size_t input_height = 1;
|
||||
size_t input_width = 1;
|
||||
float objectness_score = 0;
|
||||
};
|
||||
using DetectionOutputAttrs = ov::op::v0::DetectionOutput::Attributes;
|
||||
|
||||
namespace v0 {
|
||||
/// \brief Layer which performs non-max suppression to
|
||||
/// generate detection output using location and confidence predictions
|
||||
class NGRAPH_API DetectionOutput : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
DetectionOutput() = default;
|
||||
/// \brief Constructs a DetectionOutput operation
|
||||
///
|
||||
/// \param box_logits Box logits
|
||||
/// \param class_preds Class predictions
|
||||
/// \param proposals Proposals
|
||||
/// \param aux_class_preds Auxilary class predictions
|
||||
/// \param aux_box_preds Auxilary box predictions
|
||||
/// \param attrs Detection Output attributes
|
||||
DetectionOutput(const Output<Node>& box_logits,
|
||||
const Output<Node>& class_preds,
|
||||
const Output<Node>& proposals,
|
||||
const Output<Node>& aux_class_preds,
|
||||
const Output<Node>& aux_box_preds,
|
||||
const DetectionOutputAttrs& attrs);
|
||||
|
||||
/// \brief Constructs a DetectionOutput operation
|
||||
///
|
||||
/// \param box_logits Box logits
|
||||
/// \param class_preds Class predictions
|
||||
/// \param proposals Proposals
|
||||
/// \param attrs Detection Output attributes
|
||||
DetectionOutput(const Output<Node>& box_logits,
|
||||
const Output<Node>& class_preds,
|
||||
const Output<Node>& proposals,
|
||||
const DetectionOutputAttrs& attrs);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
const DetectionOutputAttrs& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
private:
|
||||
DetectionOutputAttrs m_attrs;
|
||||
};
|
||||
using ov::op::v0::DetectionOutput;
|
||||
} // namespace v0
|
||||
using v0::DetectionOutput;
|
||||
} // namespace op
|
||||
|
||||
@@ -23,33 +23,12 @@
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "ngraph/op/util/fft_base.hpp"
|
||||
#include "openvino/op/dft.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v7 {
|
||||
/// \brief An operation DFT that computes the discrete Fourier transformation.
|
||||
class NGRAPH_API DFT : public util::FFTBase {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
DFT() = default;
|
||||
|
||||
/// \brief Constructs a DFT operation. DFT is performed for full size axes.
|
||||
///
|
||||
/// \param data Input data
|
||||
/// \param axes Axes to perform DFT
|
||||
DFT(const Output<Node>& data, const Output<Node>& axes);
|
||||
|
||||
/// \brief Constructs a DFT operation.
|
||||
///
|
||||
/// \param data Input data
|
||||
/// \param axes Axes to perform DFT
|
||||
/// \param signal_size Signal sizes for 'axes'
|
||||
DFT(const Output<Node>& data, const Output<Node>& axes, const Output<Node>& signal_size);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
using ov::op::v7::DFT;
|
||||
} // namespace v7
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -5,51 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/util/binary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/op/divide.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
/// \brief Elementwise division operation.
|
||||
class NGRAPH_API Divide : public util::BinaryElementwiseArithmetic {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
/// \brief Constructs a division operation.
|
||||
Divide() : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NUMPY) {}
|
||||
|
||||
/// \brief Constructs a division operation.
|
||||
///
|
||||
/// \param arg0 Node that produces the first input tensor.
|
||||
/// \param arg1 Node that produces the second input tensor.
|
||||
/// \param pythondiv Use Python style rounding for integral type
|
||||
/// \param auto_broadcast Auto broadcast specification
|
||||
Divide(const Output<Node>& arg0,
|
||||
const Output<Node>& arg1,
|
||||
bool pythondiv,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY));
|
||||
|
||||
/// \brief Constructs a division operation.
|
||||
///
|
||||
/// \param arg0 Node that produces the first input tensor.
|
||||
/// \param arg1 Node that produces the second input tensor.
|
||||
/// \param auto_broadcast Auto broadcast specification
|
||||
Divide(const Output<Node>& arg0,
|
||||
const Output<Node>& arg1,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY));
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
bool is_pythondiv() const {
|
||||
return m_pythondiv;
|
||||
}
|
||||
void set_is_pythondiv(bool pythondiv) {
|
||||
m_pythondiv = pythondiv;
|
||||
}
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
|
||||
protected:
|
||||
bool m_pythondiv{true};
|
||||
};
|
||||
using ov::op::v1::Divide;
|
||||
} // namespace v1
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -6,67 +6,12 @@
|
||||
|
||||
#include "ngraph/node.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "openvino/op/einsum.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v7 {
|
||||
/// \brief Einsum operation.
|
||||
class NGRAPH_API Einsum : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
Einsum() = default;
|
||||
|
||||
///
|
||||
/// \brief Constructs Einsum operation.
|
||||
///
|
||||
/// \param inputs Input nodes on which Einsum operation performs
|
||||
/// contraction
|
||||
///
|
||||
/// \param equation Einstein summation convention
|
||||
///
|
||||
Einsum(const OutputVector& inputs, const std::string& equation);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
/// \brief Get an equation of Einsum operation
|
||||
///
|
||||
/// \return Einsum equation
|
||||
///
|
||||
std::string get_equation() const {
|
||||
return m_equation;
|
||||
}
|
||||
|
||||
/// \brief Check correctness of equation format and extract input subscripts
|
||||
/// and output subscript
|
||||
///
|
||||
/// \param equation Equation to be parsed and checked
|
||||
///
|
||||
/// \param input_subscripts A vector of extracted input subscripts
|
||||
///
|
||||
/// \param output_subscript An output subscript
|
||||
///
|
||||
static void parse_equation(const std::string& equation,
|
||||
std::vector<std::string>& input_subscripts,
|
||||
std::string& output_subscript);
|
||||
|
||||
/// \brief Extract labels (from subscript) that can be alphabetic letters or
|
||||
/// ellipsis
|
||||
///
|
||||
/// \param subscript Subscript
|
||||
///
|
||||
/// \return A vector of extracted labels from the input subscript in the order
|
||||
/// of appearence
|
||||
///
|
||||
static std::vector<std::string> extract_labels(const std::string& subscript);
|
||||
|
||||
private:
|
||||
std::string m_equation;
|
||||
};
|
||||
using ov::op::v7::Einsum;
|
||||
} // namespace v7
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -6,37 +6,12 @@
|
||||
|
||||
#include "ngraph/node.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "openvino/op/elu.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Exponential Linear Unit
|
||||
/// x < 0 => f(x) = alpha * (exp(x) - 1.)
|
||||
/// x >= 0 => f(x) = x
|
||||
///
|
||||
class NGRAPH_API Elu : public ngraph::op::Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
Elu() = default;
|
||||
/// \brief Constructs an Elu operation.
|
||||
///
|
||||
/// \param data Input tensor
|
||||
/// \param alpha Multiplier for negative values
|
||||
Elu(const Output<Node>& data, const double alpha);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
double get_alpha() const {
|
||||
return m_alpha;
|
||||
}
|
||||
|
||||
private:
|
||||
double m_alpha;
|
||||
};
|
||||
using ov::op::v0::Elu;
|
||||
} // namespace v0
|
||||
using v0::Elu;
|
||||
} // namespace op
|
||||
|
||||
@@ -6,75 +6,12 @@
|
||||
|
||||
#include "ngraph/axis_set.hpp"
|
||||
#include "ngraph/op/util/index_reduction.hpp"
|
||||
#include "openvino/op/embedding_segments_sum.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v3 {
|
||||
/// \brief Returns embeddings for given indices
|
||||
class NGRAPH_API EmbeddingSegmentsSum : public Op {
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"EmbeddingSegmentsSum", 3};
|
||||
const NodeTypeInfo& get_type_info() const override {
|
||||
return type_info;
|
||||
}
|
||||
/// \brief Constructs a EmbeddingSegmentsSum operation.
|
||||
EmbeddingSegmentsSum() = default;
|
||||
/// \brief Constructs a EmbeddingSegmentsSum operation.
|
||||
///
|
||||
/// EmbeddingSegmentsSum constructs an output tensor by replacing every index in a
|
||||
/// given
|
||||
/// input tensor with a row (from the weights matrix) at that index
|
||||
///
|
||||
/// \param 'emb_table' tensor containing the embedding lookup table of the module of
|
||||
/// shape [num_emb, emb_dim1, emb_dim2, ...] and of type T
|
||||
/// \param 'indices' tensor of shape [num_indices] and of type T_IND. Required
|
||||
/// \param `segment_ids` tensor of shape `[num_indices]` and of type *T_IND* with
|
||||
/// indices
|
||||
/// into the output Tensor. Values should be sorted and can be repeated. Required.
|
||||
/// \param `num_segments` scalar of type *T_IND* indicating the number of segments.
|
||||
/// Required.
|
||||
/// \param 'default_index' scalar of type T_IND containing default index in
|
||||
/// embedding
|
||||
/// table to fill empty "bags". If not provided empty "bags"
|
||||
/// are filled with zeros. Optional.
|
||||
/// \param 'per_sample_weights' tensor of the same shape as indices and of type T.
|
||||
/// Each value in this tensor are multiplied with each
|
||||
/// value pooled from embedding table for each index. Optional.
|
||||
|
||||
EmbeddingSegmentsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& segment_ids,
|
||||
const Output<Node>& num_segments,
|
||||
const Output<Node>& default_index,
|
||||
const Output<Node>& per_sample_weights);
|
||||
|
||||
EmbeddingSegmentsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& segment_ids,
|
||||
const Output<Node>& num_segments,
|
||||
const Output<Node>& default_index);
|
||||
|
||||
EmbeddingSegmentsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& segment_ids,
|
||||
const Output<Node>& num_segments);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool visit_attributes(AttributeVisitor&) override {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr int EMB_TABLE = 0;
|
||||
static constexpr int INDICES = 1;
|
||||
static constexpr int SEGMENT_IDS = 2;
|
||||
static constexpr int NUM_SEGMENTS = 3;
|
||||
static constexpr int DEFAULT_INDEX = 4;
|
||||
static constexpr int PER_SAMPLE_WEIGHTS = 5;
|
||||
};
|
||||
using ov::op::v3::EmbeddingSegmentsSum;
|
||||
} // namespace v3
|
||||
using v3::EmbeddingSegmentsSum;
|
||||
} // namespace op
|
||||
|
||||
@@ -7,52 +7,12 @@
|
||||
#include "ngraph/axis_set.hpp"
|
||||
#include "ngraph/op/util/embeddingbag_offsets_base.hpp"
|
||||
#include "ngraph/op/util/index_reduction.hpp"
|
||||
#include "openvino/op/embeddingbag_offsets_sum.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v3 {
|
||||
/// \brief Returns embeddings for given indices
|
||||
class NGRAPH_API EmbeddingBagOffsetsSum : public util::EmbeddingBagOffsetsBase {
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"EmbeddingBagOffsetsSum", 3};
|
||||
const NodeTypeInfo& get_type_info() const override {
|
||||
return type_info;
|
||||
}
|
||||
/// \brief Constructs a EmbeddingBagOffsetsSum operation.
|
||||
EmbeddingBagOffsetsSum() = default;
|
||||
/// \brief Constructs a EmbeddingBagOffsetsSum operation.
|
||||
///
|
||||
/// EmbeddingBagOffsetsSum constructs an output tensor by replacing every index in a
|
||||
/// given
|
||||
/// input tensor with a row (from the weights matrix) at that index
|
||||
///
|
||||
/// \param emb_table tensor containing the embedding lookup table of the module of
|
||||
/// shape [num_emb, emb_dim1, emb_dim2, ...] and of type T
|
||||
/// \param tensor of shape [num_indices] and of type T_IND. Required
|
||||
/// \param offsets tensor of shape [batch] and of type T_IND containing the starting
|
||||
/// index positions of each "bag" in indices. Required.
|
||||
/// \param default_index scalar of type T_IND containing default index in embedding
|
||||
/// table to fill empty "bags". If not provided empty "bags"
|
||||
/// are filled with zeros. Optional.
|
||||
/// \param per_sample_weigths tensor of the same shape as indices and of type T.
|
||||
/// Each value in this tensor are multiplied with each
|
||||
/// value pooled from embedding table for each index. Optional.
|
||||
|
||||
EmbeddingBagOffsetsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& default_index,
|
||||
const Output<Node>& per_sample_weights);
|
||||
|
||||
EmbeddingBagOffsetsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& default_index);
|
||||
|
||||
EmbeddingBagOffsetsSum(const Output<Node>& emb_table, const Output<Node>& indices, const Output<Node>& offsets);
|
||||
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
using ov::op::v3::EmbeddingBagOffsetsSum;
|
||||
} // namespace v3
|
||||
using v3::EmbeddingBagOffsetsSum;
|
||||
} // namespace op
|
||||
|
||||
@@ -7,41 +7,12 @@
|
||||
#include "ngraph/axis_set.hpp"
|
||||
#include "ngraph/op/util/embeddingbag_packed_base.hpp"
|
||||
#include "ngraph/op/util/index_reduction.hpp"
|
||||
#include "openvino/op/embeddingbag_packedsum.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v3 {
|
||||
/// \brief Returns embeddings for given indices
|
||||
class NGRAPH_API EmbeddingBagPackedSum : public util::EmbeddingBagPackedBase {
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"EmbeddingBagPackedSum", 3};
|
||||
const NodeTypeInfo& get_type_info() const override {
|
||||
return type_info;
|
||||
}
|
||||
/// \brief Constructs a EmbeddingBagPackedSum operation.
|
||||
EmbeddingBagPackedSum() = default;
|
||||
/// \brief Constructs a EmbeddingBagPackedSum operation.
|
||||
///
|
||||
/// EmbeddingBagPackedSum constructs an output tensor by replacing every index in a
|
||||
/// given
|
||||
/// input tensor with a row (from the weights matrix) at that index
|
||||
///
|
||||
/// \param emb_table Tensor containing the embedding lookup table of the module of
|
||||
/// shape [num_emb, emb_dim1, emb_dim2, ...] and of type T
|
||||
/// \param indices Tensor of shape `[batch, indices_per_bag]` and of type *T_IND*.
|
||||
/// Required.
|
||||
/// \param per_sample_weigths tensor of the same shape as indices and of type T.
|
||||
/// Each value in this tensor are multiplied with each
|
||||
/// value pooled from embedding table for each index. Optional.
|
||||
|
||||
EmbeddingBagPackedSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& per_sample_weights);
|
||||
|
||||
EmbeddingBagPackedSum(const Output<Node>& emb_table, const Output<Node>& indices);
|
||||
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
using ov::op::v3::EmbeddingBagPackedSum;
|
||||
} // namespace v3
|
||||
using v3::EmbeddingBagPackedSum;
|
||||
} // namespace op
|
||||
|
||||
@@ -5,47 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/util/binary_elementwise_comparison.hpp"
|
||||
#include "openvino/op/equal.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
// clang-format off
|
||||
/// \brief Elementwise is-equal operation.
|
||||
///
|
||||
/// ## Inputs
|
||||
///
|
||||
/// | | Type | Description |
|
||||
/// | ------ | --------------------------------- | ------------------------------------------------------ |
|
||||
/// | `arg0` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of any shape and element type. |
|
||||
/// | `arg1` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of the same shape and element type as `arg0`. |
|
||||
/// | `autob`| AutoBroadcastSpec | Auto broadcast specification. |
|
||||
///
|
||||
/// ## Output
|
||||
///
|
||||
/// | Type | Description |
|
||||
/// | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
/// | \f$\texttt{bool}[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = 1\text{ if }\texttt{arg0}[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{, else } 0\f$ |
|
||||
// clang-format on
|
||||
class NGRAPH_API Equal : public util::BinaryElementwiseComparison {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
/// \brief Constructs an equal operation.
|
||||
Equal() : util::BinaryElementwiseComparison(AutoBroadcastSpec::NUMPY) {}
|
||||
/// \brief Constructs an equal operation.
|
||||
///
|
||||
/// \param arg0 Node that produces the first input tensor.
|
||||
/// \param arg1 Node that produces the second input tensor.
|
||||
/// \param auto_broadcast Auto broadcast specification
|
||||
Equal(const Output<Node>& arg0,
|
||||
const Output<Node>& arg1,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY));
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
using ov::op::v1::Equal;
|
||||
} // namespace v1
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -5,26 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/util/unary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/op/erf.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Elementwise erf operation.
|
||||
class NGRAPH_API Erf : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
/// \brief Constructs a floor operation.
|
||||
Erf() = default;
|
||||
/// \brief Constructs a floor operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
Erf(const Output<Node>& arg);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
using ov::op::v0::Erf;
|
||||
} // namespace v0
|
||||
using v0::Erf;
|
||||
} // namespace op
|
||||
|
||||
@@ -5,28 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/util/unary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/op/exp.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Elementwise natural exponential (exp) operation.
|
||||
class NGRAPH_API Exp : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs an exponential operation.
|
||||
Exp() = default;
|
||||
/// \brief Constructs an exponential operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
Exp(const Output<Node>& arg);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
using ov::op::v0::Exp;
|
||||
} // namespace v0
|
||||
using v0::Exp;
|
||||
} // namespace op
|
||||
|
||||
@@ -10,65 +10,12 @@
|
||||
#include "ngraph/attribute_adapter.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "openvino/op/experimental_detectron_detection_output.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronDetectionOutput performs
|
||||
/// non-maximum suppression to generate the detection output using
|
||||
/// information on location and score predictions.
|
||||
class NGRAPH_API ExperimentalDetectronDetectionOutput : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Structure that specifies attributes of the operation
|
||||
struct Attributes {
|
||||
// specifies score threshold
|
||||
float score_threshold;
|
||||
// specifies NMS threshold
|
||||
float nms_threshold;
|
||||
// specifies maximal delta of logarithms for width and height
|
||||
float max_delta_log_wh;
|
||||
// specifies number of detected classes
|
||||
int64_t num_classes;
|
||||
// specifies maximal number of detections per class
|
||||
int64_t post_nms_count;
|
||||
// specifies maximual number of detections per image
|
||||
size_t max_detections_per_image;
|
||||
// a flag specifies whether to delete background classes or not
|
||||
// `true` means background classes should be deleted,
|
||||
// `false` means background classes shouldn't be deleted.
|
||||
bool class_agnostic_box_regression;
|
||||
// specifies deltas of weights
|
||||
std::vector<float> deltas_weights;
|
||||
};
|
||||
|
||||
ExperimentalDetectronDetectionOutput() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronDetectionOutput operation.
|
||||
///
|
||||
/// \param input_rois Input rois
|
||||
/// \param input_deltas Input deltas
|
||||
/// \param input_scores Input scores
|
||||
/// \param input_im_info Input image info
|
||||
/// \param attrs Attributes attributes
|
||||
ExperimentalDetectronDetectionOutput(const Output<Node>& input_rois,
|
||||
const Output<Node>& input_deltas,
|
||||
const Output<Node>& input_scores,
|
||||
const Output<Node>& input_im_info,
|
||||
const Attributes& attrs);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
/// \brief Returns attributes of the operation ExperimentalDetectronDetectionOutput
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
};
|
||||
using ov::op::v6::ExperimentalDetectronDetectionOutput;
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -10,55 +10,12 @@
|
||||
#include "ngraph/attribute_adapter.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "openvino/op/experimental_detectron_generate_proposals.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronGenerateProposalsSingleImage
|
||||
/// computes ROIs and their scores based on input data.
|
||||
class NGRAPH_API ExperimentalDetectronGenerateProposalsSingleImage : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Structure that specifies attributes of the operation
|
||||
struct Attributes {
|
||||
// minimum box width & height
|
||||
float min_size;
|
||||
// specifies NMS threshold
|
||||
float nms_threshold;
|
||||
// number of top-n proposals after NMS
|
||||
int64_t post_nms_count;
|
||||
// number of top-n proposals before NMS
|
||||
int64_t pre_nms_count;
|
||||
};
|
||||
|
||||
ExperimentalDetectronGenerateProposalsSingleImage() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronGenerateProposalsSingleImage operation.
|
||||
///
|
||||
/// \param im_info Input image info
|
||||
/// \param anchors Input anchors
|
||||
/// \param deltas Input deltas
|
||||
/// \param scores Input scores
|
||||
/// \param attrs Operation attributes
|
||||
ExperimentalDetectronGenerateProposalsSingleImage(const Output<Node>& im_info,
|
||||
const Output<Node>& anchors,
|
||||
const Output<Node>& deltas,
|
||||
const Output<Node>& scores,
|
||||
const Attributes& attrs);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
};
|
||||
using ov::op::v6::ExperimentalDetectronGenerateProposalsSingleImage;
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -10,58 +10,12 @@
|
||||
#include "ngraph/attribute_adapter.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "openvino/op/experimental_detectron_prior_grid_generator.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronPriorGridGenerator generates prior
|
||||
/// grids of specified sizes.
|
||||
class NGRAPH_API ExperimentalDetectronPriorGridGenerator : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Structure that specifies attributes of the operation
|
||||
struct Attributes {
|
||||
// Specifies whether the output tensor should be 2D or 4D
|
||||
// `true` means the output tensor should be 2D tensor,
|
||||
// `false` means the output tensor should be 4D tensor.
|
||||
bool flatten;
|
||||
// Specifies number of cells of the generated grid with respect to height.
|
||||
int64_t h;
|
||||
// Specifies number of cells of the generated grid with respect to width.
|
||||
int64_t w;
|
||||
// Specifies the step of generated grid with respect to x coordinate
|
||||
float stride_x;
|
||||
// Specifies the step of generated grid with respect to y coordinate
|
||||
float stride_y;
|
||||
};
|
||||
|
||||
ExperimentalDetectronPriorGridGenerator() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronDetectionOutput operation.
|
||||
///
|
||||
/// \param priors Input priors
|
||||
/// \param feature_map Input feature map
|
||||
/// \param im_data Image data
|
||||
/// \param attrs attributes
|
||||
ExperimentalDetectronPriorGridGenerator(const Output<Node>& priors,
|
||||
const Output<Node>& feature_map,
|
||||
const Output<Node>& im_data,
|
||||
const Attributes& attrs);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
/// \brief Returns attributes of this operation.
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
|
||||
void validate();
|
||||
};
|
||||
using ov::op::v6::ExperimentalDetectronPriorGridGenerator;
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -11,49 +11,12 @@
|
||||
#include "ngraph/attribute_adapter.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "openvino/op/experimental_detectron_roi_feature.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronROIFeatureExtractor
|
||||
/// is the ROIAlign operation applied over a feature pyramid.
|
||||
class NGRAPH_API ExperimentalDetectronROIFeatureExtractor : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Structure that specifies attributes of the operation
|
||||
struct Attributes {
|
||||
int64_t output_size;
|
||||
int64_t sampling_ratio;
|
||||
std::vector<int64_t> pyramid_scales;
|
||||
bool aligned;
|
||||
};
|
||||
|
||||
ExperimentalDetectronROIFeatureExtractor() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronROIFeatureExtractor operation.
|
||||
///
|
||||
/// \param args Inputs of ExperimentalDetectronROIFeatureExtractor
|
||||
/// \param attrs Operation attributes
|
||||
ExperimentalDetectronROIFeatureExtractor(const OutputVector& args, const Attributes& attrs);
|
||||
|
||||
/// \brief Constructs a ExperimentalDetectronROIFeatureExtractor operation.
|
||||
///
|
||||
/// \param args Inputs of ExperimentalDetectronROIFeatureExtractor
|
||||
/// \param attrs Operation attributes
|
||||
ExperimentalDetectronROIFeatureExtractor(const NodeVector& args, const Attributes& attrs);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
/// \brief Returns attributes of the operation.
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
};
|
||||
using ov::op::v6::ExperimentalDetectronROIFeatureExtractor;
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -10,36 +10,12 @@
|
||||
#include "ngraph/attribute_adapter.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "openvino/op/experimental_detectron_topkrois.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronTopKROIs, according to the repository
|
||||
/// is TopK operation applied to probabilities of input ROIs.
|
||||
class NGRAPH_API ExperimentalDetectronTopKROIs : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
ExperimentalDetectronTopKROIs() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronTopKROIs operation.
|
||||
///
|
||||
/// \param input_rois Input rois
|
||||
/// \param rois_probs Probabilities for input rois
|
||||
/// \param max_rois Maximal numbers of output rois
|
||||
ExperimentalDetectronTopKROIs(const Output<Node>& input_rois, const Output<Node>& rois_probs, size_t max_rois = 0);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
size_t get_max_rois() const {
|
||||
return m_max_rois;
|
||||
}
|
||||
|
||||
private:
|
||||
size_t m_max_rois;
|
||||
};
|
||||
using ov::op::v6::ExperimentalDetectronTopKROIs;
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -5,66 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "openvino/op/extractimagepatches.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v3 {
|
||||
class NGRAPH_API ExtractImagePatches : public Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
ExtractImagePatches() = default;
|
||||
/// \brief Constructs a ExtractImagePatches operation
|
||||
///
|
||||
/// \param data 4-D Input data to extract image patches
|
||||
/// \param sizes Patch size in the format of [size_rows, size_cols]
|
||||
/// \param strides Patch movement stride in the format of [stride_rows, stride_cols]
|
||||
/// \param rates Element seleciton rate for creating a patch. in the format of
|
||||
/// [rate_rows, rate_cols]
|
||||
/// \param auto_pad Padding type. it can be any value from
|
||||
/// valid, same_lower, same_upper
|
||||
ExtractImagePatches(const Output<Node>& image,
|
||||
const Shape& sizes,
|
||||
const Strides& strides,
|
||||
const Shape& rates,
|
||||
const PadType& auto_pad);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
const Shape& get_sizes() const {
|
||||
return m_patch_sizes;
|
||||
}
|
||||
void set_sizes(const Shape& sizes) {
|
||||
m_patch_sizes = sizes;
|
||||
}
|
||||
const Strides& get_strides() const {
|
||||
return m_patch_movement_strides;
|
||||
}
|
||||
void set_strides(const Strides& strides) {
|
||||
m_patch_movement_strides = strides;
|
||||
}
|
||||
const Shape& get_rates() const {
|
||||
return m_patch_selection_rates;
|
||||
}
|
||||
void set_rates(const Shape& rates) {
|
||||
m_patch_selection_rates = rates;
|
||||
}
|
||||
const PadType& get_auto_pad() const {
|
||||
return m_padding;
|
||||
}
|
||||
void set_auto_pad(PadType& padding) {
|
||||
m_padding = padding;
|
||||
}
|
||||
|
||||
private:
|
||||
Shape m_patch_sizes;
|
||||
Strides m_patch_movement_strides;
|
||||
Shape m_patch_selection_rates;
|
||||
PadType m_padding;
|
||||
};
|
||||
using ov::op::v3::ExtractImagePatches;
|
||||
} // namespace v3
|
||||
using v3::ExtractImagePatches;
|
||||
} // namespace op
|
||||
|
||||
@@ -7,76 +7,12 @@
|
||||
#include "ngraph/node.hpp"
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "openvino/op/fake_quantize.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
///
|
||||
/// \brief Class performing element-wise linear quantization.
|
||||
///
|
||||
/// \note Input floating point values are quantized into a discrete
|
||||
/// set of floating point values.
|
||||
///
|
||||
/// \paragraph Implementation This class creates a node which performs the following
|
||||
/// operation:
|
||||
///
|
||||
/// round((data - input_low) / (input_high - input_low) * (levels-1)) /
|
||||
/// (levels-1) * (output_high - output_low) + output_low
|
||||
///
|
||||
///
|
||||
class NGRAPH_API FakeQuantize : public ngraph::op::Op {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
FakeQuantize();
|
||||
///
|
||||
/// \brief Constructs a FakeQuantize operation node.
|
||||
///
|
||||
/// \param[in] data The input data tensor.
|
||||
/// \param[in] input_low The minimum limit for input values.
|
||||
/// \param[in] input_high The maximum limit for input values.
|
||||
/// \param[in] output_low The minimum quantized value.
|
||||
/// \param[in] output_high The maximum quantized value.
|
||||
/// \param[in] levels The number of quantization levels.
|
||||
/// \param[in] auto_broadcast AutoBroadcast mode to be used for broadcasting
|
||||
/// limit values
|
||||
///
|
||||
FakeQuantize(const Output<Node>& data,
|
||||
const Output<Node>& input_low,
|
||||
const Output<Node>& input_high,
|
||||
const Output<Node>& output_low,
|
||||
const Output<Node>& output_high,
|
||||
std::size_t levels,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY));
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
virtual void validate_and_infer_types() override;
|
||||
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
std::size_t get_levels() const {
|
||||
return m_levels;
|
||||
}
|
||||
void set_levels(std::size_t levels) {
|
||||
m_levels = levels;
|
||||
}
|
||||
const AutoBroadcastSpec& get_auto_broadcast() const {
|
||||
return m_auto_broadcast;
|
||||
}
|
||||
void set_auto_broadcast(const AutoBroadcastSpec& auto_broadcast) {
|
||||
m_auto_broadcast = auto_broadcast;
|
||||
}
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
bool constant_fold(OutputVector& output_values, const OutputVector& inputs_values) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
std::size_t m_levels;
|
||||
AutoBroadcastSpec m_auto_broadcast = op::AutoBroadcastType::NUMPY;
|
||||
};
|
||||
using ov::op::v0::FakeQuantize;
|
||||
} // namespace v0
|
||||
using v0::FakeQuantize;
|
||||
} // namespace op
|
||||
|
||||
@@ -5,26 +5,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/util/unary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/op/floor.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Elementwise floor operation.
|
||||
class NGRAPH_API Floor : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
/// \brief Constructs a floor operation.
|
||||
Floor() = default;
|
||||
/// \brief Constructs a floor operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
Floor(const Output<Node>& arg);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
virtual std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
using ov::op::v0::Floor;
|
||||
} // namespace v0
|
||||
using v0::Floor;
|
||||
} // namespace op
|
||||
|
||||
@@ -7,40 +7,13 @@
|
||||
#include <memory>
|
||||
|
||||
#include "ngraph/op/util/binary_elementwise_arithmetic.hpp"
|
||||
#include "openvino/op/floor_mod.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
/// \brief Elementwise FloorMod operation.
|
||||
///
|
||||
class NGRAPH_API FloorMod : public util::BinaryElementwiseArithmetic {
|
||||
public:
|
||||
NGRAPH_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs an uninitialized addition operation
|
||||
FloorMod() : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NUMPY){};
|
||||
|
||||
/// \brief Constructs an Floor Mod operation.
|
||||
///
|
||||
/// \param arg0 Output that produces the first input tensor.<br>
|
||||
/// `[d0, ...]`
|
||||
/// \param arg1 Output that produces the second input tensor.<br>
|
||||
/// `[d0, ...]`
|
||||
/// \param auto_broadcast Auto broadcast specification
|
||||
///
|
||||
/// Output `[d0, ...]`
|
||||
///
|
||||
FloorMod(const Output<Node>& arg0,
|
||||
const Output<Node>& arg1,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastType::NUMPY);
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
using ov::op::v1::FloorMod;
|
||||
} // namespace v1
|
||||
|
||||
using v1::FloorMod;
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
@@ -0,0 +1,175 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/core/coordinate_diff.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
#include "openvino/op/util/deformable_convolution_base.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
/// \brief DeformableConvolution operation.
|
||||
class OPENVINO_API DeformableConvolution : public op::util::DeformableConvolutionBase {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs a conversion operation.
|
||||
DeformableConvolution() = default;
|
||||
/// \brief Constructs a conversion operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
/// \param offsets Node producing the deformable values tensor.
|
||||
/// \param filters Node producing the filters(kernels) tensor with OIZYX
|
||||
/// layout.
|
||||
/// \param strides Convolution strides.
|
||||
/// \param pads_begin Amount of padding to be added to the beginning along
|
||||
/// each axis. For example in case of a 2D input the value
|
||||
/// of (1, 2) means that 1 element will be added to the
|
||||
/// top and 2 elements to the left.
|
||||
/// \param pads_end Amount of padding to be added to the end along each
|
||||
/// axis.
|
||||
/// \param dilations The distance in width and height between the weights
|
||||
/// in the filters tensor.
|
||||
/// \param auto_pad Specifies how the automatic calculation of padding
|
||||
/// should be done.
|
||||
/// \param group The number of groups which both output and input
|
||||
/// should be split into.
|
||||
/// \param deformable_group The number of groups which deformable values and
|
||||
/// output should be split into along the channel axis.
|
||||
DeformableConvolution(const Output<Node>& arg,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& filters,
|
||||
const Strides& strides,
|
||||
const CoordinateDiff& pads_begin,
|
||||
const CoordinateDiff& pads_end,
|
||||
const Strides& dilations,
|
||||
const PadType& auto_pad = PadType::EXPLICIT,
|
||||
const int64_t group = 1,
|
||||
const int64_t deformable_group = 1);
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
namespace v8 {
|
||||
class OPENVINO_API DeformableConvolution : public op::util::DeformableConvolutionBase {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs a conversion operation.
|
||||
DeformableConvolution() = default;
|
||||
/// \brief Constructs a conversion operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
/// \param offsets Node producing the deformable values tensor.
|
||||
/// \param filters Node producing the filters(kernels) tensor with OIZYX
|
||||
/// layout.
|
||||
/// \param strides Convolution strides.
|
||||
/// \param pads_begin Amount of padding to be added to the beginning along
|
||||
/// each axis. For example in case of a 2D input the value
|
||||
/// of (1, 2) means that 1 element will be added to the
|
||||
/// top and 2 elements to the left.
|
||||
/// \param pads_end Amount of padding to be added to the end along each
|
||||
/// axis.
|
||||
/// \param dilations The distance in width and height between the weights
|
||||
/// in the filters tensor.
|
||||
/// \param auto_pad Specifies how the automatic calculation of padding
|
||||
/// should be done.
|
||||
/// \param group The number of groups which both output and input
|
||||
/// should be split into.
|
||||
/// \param deformable_group The number of groups which deformable values and
|
||||
/// output should be split into along the channel axis.
|
||||
/// \param bilinear_interpolation_pad
|
||||
/// The flag that determines the mode of bilinear
|
||||
/// interpolation execution.
|
||||
/// If the flag is `true` and the sampling location is
|
||||
/// within one pixel outside of the feature map boundary,
|
||||
/// then bilinear interpolation is performed on the zero
|
||||
/// padded feature map. If the flag is `false` and the
|
||||
/// sampling location is within one pixel outside of the
|
||||
/// feature map boundary, then the sampling location
|
||||
/// shifts to the inner boundary of the feature map.`
|
||||
DeformableConvolution(const Output<Node>& arg,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& filters,
|
||||
const Strides& strides,
|
||||
const CoordinateDiff& pads_begin,
|
||||
const CoordinateDiff& pads_end,
|
||||
const Strides& dilations,
|
||||
const PadType& auto_pad = PadType::EXPLICIT,
|
||||
const int64_t group = 1,
|
||||
const int64_t deformable_group = 1,
|
||||
const bool bilinear_interpolation_pad = false);
|
||||
|
||||
/// \brief Constructs a conversion operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
/// \param offsets Node producing the deformable values tensor.
|
||||
/// \param filters Node producing the filters(kernels) tensor with OIZYX
|
||||
/// layout.
|
||||
/// \param mask Node producing the mask(mask) tensor.
|
||||
/// \param strides Convolution strides.
|
||||
/// \param pads_begin Amount of padding to be added to the beginning along
|
||||
/// each axis. For example in case of a 2D input the value
|
||||
/// of (1, 2) means that 1 element will be added to the
|
||||
/// top and 2 elements to the left.
|
||||
/// \param pads_end Amount of padding to be added to the end along each
|
||||
/// axis.
|
||||
/// \param dilations The distance in width and height between the weights
|
||||
/// in the filters tensor.
|
||||
/// \param auto_pad Specifies how the automatic calculation of padding
|
||||
/// should be done.
|
||||
/// \param group The number of groups which both output and input
|
||||
/// should be split into.
|
||||
/// \param deformable_group The number of groups which deformable values and
|
||||
/// output should be split into along the channel axis.
|
||||
/// \param bilinear_interpolation_pad
|
||||
/// The flag that determines the mode of bilinear
|
||||
/// interpolation execution.
|
||||
/// If the flag is `true` and the sampling location is
|
||||
/// within one pixel outside of the feature map boundary,
|
||||
/// then bilinear interpolation is performed on the zero
|
||||
/// padded feature map. If the flag is `false` and the
|
||||
/// sampling location is within one pixel outside of the
|
||||
/// feature map boundary, then the sampling location
|
||||
/// shifts to the inner boundary of the feature map.
|
||||
DeformableConvolution(const Output<Node>& arg,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& filters,
|
||||
const Output<Node>& mask,
|
||||
const Strides& strides,
|
||||
const CoordinateDiff& pads_begin,
|
||||
const CoordinateDiff& pads_end,
|
||||
const Strides& dilations,
|
||||
const PadType& auto_pad = PadType::EXPLICIT,
|
||||
const int64_t group = 1,
|
||||
const int64_t deformable_group = 1,
|
||||
const bool bilinear_interpolation_pad = false);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
|
||||
bool has_evaluate() const override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool get_bilinear_interpolation_pad() const {
|
||||
return m_bilinear_interpolation_pad;
|
||||
}
|
||||
|
||||
void set_bilinear_interpolation_pad(const bool bilinear_interpolation_pad) {
|
||||
m_bilinear_interpolation_pad = bilinear_interpolation_pad;
|
||||
}
|
||||
|
||||
private:
|
||||
bool m_bilinear_interpolation_pad;
|
||||
};
|
||||
} // namespace v8
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,107 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/op.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
class OPENVINO_API DeformablePSROIPooling : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
DeformablePSROIPooling() = default;
|
||||
/// \brief Constructs a DeformablePSROIPooling operation
|
||||
///
|
||||
/// \param input Input tensor with position sensitive score maps
|
||||
/// \param coords Input tensor with list of five element tuples
|
||||
/// describing ROI coordinates
|
||||
/// \param offsets Input tensor with transformation values
|
||||
/// \param output_dim Pooled output channel number
|
||||
/// \param group_size Number of horizontal bins per row to divide ROI area,
|
||||
/// it defines output width and height
|
||||
/// \param spatial_scale Multiplicative spatial scale factor to translate ROI
|
||||
/// coordinates from their input scale to the scale used when
|
||||
/// pooling
|
||||
/// \param mode Specifies mode for pooling.
|
||||
/// \param spatial_bins_x Specifies numbers of bins to divide ROI single
|
||||
/// bin over width
|
||||
/// \param spatial_bins_y Specifies numbers of bins to divide ROI single
|
||||
/// bin over height
|
||||
/// \param no_trans The flag that specifies whenever third input exists
|
||||
/// and contains transformation (offset) values
|
||||
/// \param trans_std The value that all transformation (offset) values are
|
||||
/// multiplied with
|
||||
/// \param part_size The number of parts the output tensor spatial dimensions
|
||||
/// are divided into. Basically it is the height
|
||||
/// and width of the third input
|
||||
DeformablePSROIPooling(const Output<Node>& input,
|
||||
const Output<Node>& coords,
|
||||
const Output<Node>& offsets,
|
||||
const int64_t output_dim,
|
||||
const float spatial_scale,
|
||||
const int64_t group_size = 1,
|
||||
const std::string mode = "bilinear_deformable",
|
||||
int64_t spatial_bins_x = 1,
|
||||
int64_t spatial_bins_y = 1,
|
||||
float trans_std = 1,
|
||||
int64_t part_size = 1);
|
||||
|
||||
DeformablePSROIPooling(const Output<Node>& input,
|
||||
const Output<Node>& coords,
|
||||
const int64_t output_dim,
|
||||
const float spatial_scale,
|
||||
const int64_t group_size = 1,
|
||||
const std::string mode = "bilinear_deformable",
|
||||
int64_t spatial_bins_x = 1,
|
||||
int64_t spatial_bins_y = 1,
|
||||
float trans_std = 1,
|
||||
int64_t part_size = 1);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
int64_t get_output_dim() const {
|
||||
return m_output_dim;
|
||||
}
|
||||
int64_t get_group_size() const {
|
||||
return m_group_size;
|
||||
}
|
||||
float get_spatial_scale() const {
|
||||
return m_spatial_scale;
|
||||
}
|
||||
const std::string& get_mode() const {
|
||||
return m_mode;
|
||||
}
|
||||
int64_t get_spatial_bins_x() const {
|
||||
return m_spatial_bins_x;
|
||||
}
|
||||
int64_t get_spatial_bins_y() const {
|
||||
return m_spatial_bins_y;
|
||||
}
|
||||
float get_trans_std() const {
|
||||
return m_trans_std;
|
||||
}
|
||||
int64_t get_part_size() const {
|
||||
return m_part_size;
|
||||
}
|
||||
|
||||
private:
|
||||
int64_t m_output_dim;
|
||||
float m_spatial_scale;
|
||||
int64_t m_group_size = 1;
|
||||
std::string m_mode = "bilinear_deformable";
|
||||
int64_t m_spatial_bins_x = 1;
|
||||
int64_t m_spatial_bins_y = 1;
|
||||
float m_trans_std = 1.f;
|
||||
int64_t m_part_size = 1;
|
||||
};
|
||||
} // namespace v1
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,78 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief DepthToSpace permutes data from the depth dimension of the input blob into
|
||||
/// spatial dimensions.
|
||||
///
|
||||
/// \note Values from the depth dimension (assuming NCHW layout) are moved in
|
||||
/// spatial blocks to the height and width dimensions.
|
||||
///
|
||||
/// Output node produces a tensor with shape:
|
||||
/// [N, C/(blocksize * blocksize), H * blocksize, W * blocksize]
|
||||
class OPENVINO_API DepthToSpace : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
enum class DepthToSpaceMode {
|
||||
// The input depth is divided to [block_size, ..., block_size, new_depth]
|
||||
BLOCKS_FIRST,
|
||||
// The input depth is divided to [new_depth, block_size, ..., block_size]
|
||||
DEPTH_FIRST
|
||||
};
|
||||
|
||||
DepthToSpace() = default;
|
||||
/// \brief Constructs a DepthToSpace operation.
|
||||
///
|
||||
/// \param data Node producing the input tensor
|
||||
/// \param mode Specifies how the input depth dimension is split to block
|
||||
/// coordinates
|
||||
/// \param block_size The size of the block of values to be moved
|
||||
DepthToSpace(const Output<Node>& data, const DepthToSpaceMode& mode, std::size_t block_size = 1);
|
||||
|
||||
DepthToSpace(const Output<Node>& data, const std::string& mode, std::size_t block_size = 1);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::size_t get_block_size() const {
|
||||
return m_blocksize;
|
||||
}
|
||||
DepthToSpaceMode get_mode() const {
|
||||
return m_mode;
|
||||
}
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
void validate_and_infer_types() override;
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
|
||||
protected:
|
||||
std::size_t m_blocksize;
|
||||
DepthToSpaceMode m_mode;
|
||||
};
|
||||
} // namespace v0
|
||||
} // namespace op
|
||||
|
||||
OPENVINO_API
|
||||
std::ostream& operator<<(std::ostream& s, const op::v0::DepthToSpace::DepthToSpaceMode& type);
|
||||
|
||||
template <>
|
||||
class OPENVINO_API AttributeAdapter<op::v0::DepthToSpace::DepthToSpaceMode>
|
||||
: public EnumAttributeAdapterBase<op::v0::DepthToSpace::DepthToSpaceMode> {
|
||||
public:
|
||||
AttributeAdapter(op::v0::DepthToSpace::DepthToSpaceMode& value)
|
||||
: EnumAttributeAdapterBase<op::v0::DepthToSpace::DepthToSpaceMode>(value) {}
|
||||
|
||||
static constexpr DiscreteTypeInfo type_info{"AttributeAdapter<op::v0::DepthToSpace::DepthToSpaceMode>", 0};
|
||||
const DiscreteTypeInfo& get_type_info() const override {
|
||||
return type_info;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,78 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/op.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Layer which performs non-max suppression to
|
||||
/// generate detection output using location and confidence predictions
|
||||
class OPENVINO_API DetectionOutput : public Op {
|
||||
public:
|
||||
struct Attributes {
|
||||
int num_classes;
|
||||
int background_label_id = 0;
|
||||
int top_k = -1;
|
||||
bool variance_encoded_in_target = false;
|
||||
std::vector<int> keep_top_k;
|
||||
std::string code_type = std::string{"caffe.PriorBoxParameter.CORNER"};
|
||||
bool share_location = true;
|
||||
float nms_threshold;
|
||||
float confidence_threshold = 0;
|
||||
bool clip_after_nms = false;
|
||||
bool clip_before_nms = false;
|
||||
bool decrease_label_id = false;
|
||||
bool normalized = false;
|
||||
size_t input_height = 1;
|
||||
size_t input_width = 1;
|
||||
float objectness_score = 0;
|
||||
};
|
||||
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
DetectionOutput() = default;
|
||||
/// \brief Constructs a DetectionOutput operation
|
||||
///
|
||||
/// \param box_logits Box logits
|
||||
/// \param class_preds Class predictions
|
||||
/// \param proposals Proposals
|
||||
/// \param aux_class_preds Auxilary class predictions
|
||||
/// \param aux_box_preds Auxilary box predictions
|
||||
/// \param attrs Detection Output attributes
|
||||
DetectionOutput(const Output<Node>& box_logits,
|
||||
const Output<Node>& class_preds,
|
||||
const Output<Node>& proposals,
|
||||
const Output<Node>& aux_class_preds,
|
||||
const Output<Node>& aux_box_preds,
|
||||
const Attributes& attrs);
|
||||
|
||||
/// \brief Constructs a DetectionOutput operation
|
||||
///
|
||||
/// \param box_logits Box logits
|
||||
/// \param class_preds Class predictions
|
||||
/// \param proposals Proposals
|
||||
/// \param attrs Detection Output attributes
|
||||
DetectionOutput(const Output<Node>& box_logits,
|
||||
const Output<Node>& class_preds,
|
||||
const Output<Node>& proposals,
|
||||
const Attributes& attrs);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
};
|
||||
} // namespace v0
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,53 @@
|
||||
//*****************************************************************************
|
||||
// Copyright 2017-2021 Intel Corporation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//*****************************************************************************
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/fft_base.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v7 {
|
||||
/// \brief An operation DFT that computes the discrete Fourier transformation.
|
||||
class OPENVINO_API DFT : public util::FFTBase {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
DFT() = default;
|
||||
|
||||
/// \brief Constructs a DFT operation. DFT is performed for full size axes.
|
||||
///
|
||||
/// \param data Input data
|
||||
/// \param axes Axes to perform DFT
|
||||
DFT(const Output<Node>& data, const Output<Node>& axes);
|
||||
|
||||
/// \brief Constructs a DFT operation.
|
||||
///
|
||||
/// \param data Input data
|
||||
/// \param axes Axes to perform DFT
|
||||
/// \param signal_size Signal sizes for 'axes'
|
||||
DFT(const Output<Node>& data, const Output<Node>& axes, const Output<Node>& signal_size);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
} // namespace v7
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,55 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/util/binary_elementwise_arithmetic.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
/// \brief Elementwise division operation.
|
||||
class OPENVINO_API Divide : public util::BinaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs a division operation.
|
||||
Divide() : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NUMPY) {}
|
||||
|
||||
/// \brief Constructs a division operation.
|
||||
///
|
||||
/// \param arg0 Node that produces the first input tensor.
|
||||
/// \param arg1 Node that produces the second input tensor.
|
||||
/// \param pythondiv Use Python style rounding for integral type
|
||||
/// \param auto_broadcast Auto broadcast specification
|
||||
Divide(const Output<Node>& arg0,
|
||||
const Output<Node>& arg1,
|
||||
bool pythondiv,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY));
|
||||
|
||||
/// \brief Constructs a division operation.
|
||||
///
|
||||
/// \param arg0 Node that produces the first input tensor.
|
||||
/// \param arg1 Node that produces the second input tensor.
|
||||
/// \param auto_broadcast Auto broadcast specification
|
||||
Divide(const Output<Node>& arg0,
|
||||
const Output<Node>& arg1,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY));
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
bool is_pythondiv() const {
|
||||
return m_pythondiv;
|
||||
}
|
||||
void set_is_pythondiv(bool pythondiv) {
|
||||
m_pythondiv = pythondiv;
|
||||
}
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
|
||||
protected:
|
||||
bool m_pythondiv{true};
|
||||
};
|
||||
} // namespace v1
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,71 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/op.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v7 {
|
||||
/// \brief Einsum operation.
|
||||
class OPENVINO_API Einsum : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
Einsum() = default;
|
||||
|
||||
///
|
||||
/// \brief Constructs Einsum operation.
|
||||
///
|
||||
/// \param inputs Input nodes on which Einsum operation performs
|
||||
/// contraction
|
||||
///
|
||||
/// \param equation Einstein summation convention
|
||||
///
|
||||
Einsum(const OutputVector& inputs, const std::string& equation);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
/// \brief Get an equation of Einsum operation
|
||||
///
|
||||
/// \return Einsum equation
|
||||
///
|
||||
std::string get_equation() const {
|
||||
return m_equation;
|
||||
}
|
||||
|
||||
/// \brief Check correctness of equation format and extract input subscripts
|
||||
/// and output subscript
|
||||
///
|
||||
/// \param equation Equation to be parsed and checked
|
||||
///
|
||||
/// \param input_subscripts A vector of extracted input subscripts
|
||||
///
|
||||
/// \param output_subscript An output subscript
|
||||
///
|
||||
static void parse_equation(const std::string& equation,
|
||||
std::vector<std::string>& input_subscripts,
|
||||
std::string& output_subscript);
|
||||
|
||||
/// \brief Extract labels (from subscript) that can be alphabetic letters or
|
||||
/// ellipsis
|
||||
///
|
||||
/// \param subscript Subscript
|
||||
///
|
||||
/// \return A vector of extracted labels from the input subscript in the order
|
||||
/// of appearence
|
||||
///
|
||||
static std::vector<std::string> extract_labels(const std::string& subscript);
|
||||
|
||||
private:
|
||||
std::string m_equation;
|
||||
};
|
||||
} // namespace v7
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/op.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Exponential Linear Unit
|
||||
/// x < 0 => f(x) = alpha * (exp(x) - 1.)
|
||||
/// x >= 0 => f(x) = x
|
||||
///
|
||||
class OPENVINO_API Elu : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
Elu() = default;
|
||||
/// \brief Constructs an Elu operation.
|
||||
///
|
||||
/// \param data Input tensor
|
||||
/// \param alpha Multiplier for negative values
|
||||
Elu(const Output<Node>& data, const double alpha);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
double get_alpha() const {
|
||||
return m_alpha;
|
||||
}
|
||||
|
||||
private:
|
||||
double m_alpha;
|
||||
};
|
||||
} // namespace v0
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,77 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/core/axis_set.hpp"
|
||||
#include "openvino/op/util/index_reduction.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v3 {
|
||||
/// \brief Returns embeddings for given indices
|
||||
class OPENVINO_API EmbeddingSegmentsSum : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs a EmbeddingSegmentsSum operation.
|
||||
EmbeddingSegmentsSum() = default;
|
||||
/// \brief Constructs a EmbeddingSegmentsSum operation.
|
||||
///
|
||||
/// EmbeddingSegmentsSum constructs an output tensor by replacing every index in a
|
||||
/// given
|
||||
/// input tensor with a row (from the weights matrix) at that index
|
||||
///
|
||||
/// \param 'emb_table' tensor containing the embedding lookup table of the module of
|
||||
/// shape [num_emb, emb_dim1, emb_dim2, ...] and of type T
|
||||
/// \param 'indices' tensor of shape [num_indices] and of type T_IND. Required
|
||||
/// \param `segment_ids` tensor of shape `[num_indices]` and of type *T_IND* with
|
||||
/// indices
|
||||
/// into the output Tensor. Values should be sorted and can be repeated. Required.
|
||||
/// \param `num_segments` scalar of type *T_IND* indicating the number of segments.
|
||||
/// Required.
|
||||
/// \param 'default_index' scalar of type T_IND containing default index in
|
||||
/// embedding
|
||||
/// table to fill empty "bags". If not provided empty "bags"
|
||||
/// are filled with zeros. Optional.
|
||||
/// \param 'per_sample_weights' tensor of the same shape as indices and of type T.
|
||||
/// Each value in this tensor are multiplied with each
|
||||
/// value pooled from embedding table for each index. Optional.
|
||||
|
||||
EmbeddingSegmentsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& segment_ids,
|
||||
const Output<Node>& num_segments,
|
||||
const Output<Node>& default_index,
|
||||
const Output<Node>& per_sample_weights);
|
||||
|
||||
EmbeddingSegmentsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& segment_ids,
|
||||
const Output<Node>& num_segments,
|
||||
const Output<Node>& default_index);
|
||||
|
||||
EmbeddingSegmentsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& segment_ids,
|
||||
const Output<Node>& num_segments);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool visit_attributes(AttributeVisitor&) override {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr int EMB_TABLE = 0;
|
||||
static constexpr int INDICES = 1;
|
||||
static constexpr int SEGMENT_IDS = 2;
|
||||
static constexpr int NUM_SEGMENTS = 3;
|
||||
static constexpr int DEFAULT_INDEX = 4;
|
||||
static constexpr int PER_SAMPLE_WEIGHTS = 5;
|
||||
};
|
||||
} // namespace v3
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,55 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/core/axis_set.hpp"
|
||||
#include "openvino/op/util/embeddingbag_offsets_base.hpp"
|
||||
#include "openvino/op/util/index_reduction.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v3 {
|
||||
/// \brief Returns embeddings for given indices
|
||||
class OPENVINO_API EmbeddingBagOffsetsSum : public util::EmbeddingBagOffsetsBase {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs a EmbeddingBagOffsetsSum operation.
|
||||
EmbeddingBagOffsetsSum() = default;
|
||||
/// \brief Constructs a EmbeddingBagOffsetsSum operation.
|
||||
///
|
||||
/// EmbeddingBagOffsetsSum constructs an output tensor by replacing every index in a
|
||||
/// given
|
||||
/// input tensor with a row (from the weights matrix) at that index
|
||||
///
|
||||
/// \param emb_table tensor containing the embedding lookup table of the module of
|
||||
/// shape [num_emb, emb_dim1, emb_dim2, ...] and of type T
|
||||
/// \param tensor of shape [num_indices] and of type T_IND. Required
|
||||
/// \param offsets tensor of shape [batch] and of type T_IND containing the starting
|
||||
/// index positions of each "bag" in indices. Required.
|
||||
/// \param default_index scalar of type T_IND containing default index in embedding
|
||||
/// table to fill empty "bags". If not provided empty "bags"
|
||||
/// are filled with zeros. Optional.
|
||||
/// \param per_sample_weigths tensor of the same shape as indices and of type T.
|
||||
/// Each value in this tensor are multiplied with each
|
||||
/// value pooled from embedding table for each index. Optional.
|
||||
|
||||
EmbeddingBagOffsetsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& default_index,
|
||||
const Output<Node>& per_sample_weights);
|
||||
|
||||
EmbeddingBagOffsetsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& offsets,
|
||||
const Output<Node>& default_index);
|
||||
|
||||
EmbeddingBagOffsetsSum(const Output<Node>& emb_table, const Output<Node>& indices, const Output<Node>& offsets);
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
} // namespace v3
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/core/axis_set.hpp"
|
||||
#include "openvino/op/util/embeddingbag_packed_base.hpp"
|
||||
#include "openvino/op/util/index_reduction.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v3 {
|
||||
/// \brief Returns embeddings for given indices
|
||||
class OPENVINO_API EmbeddingBagPackedSum : public util::EmbeddingBagPackedBase {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs a EmbeddingBagPackedSum operation.
|
||||
EmbeddingBagPackedSum() = default;
|
||||
/// \brief Constructs a EmbeddingBagPackedSum operation.
|
||||
///
|
||||
/// EmbeddingBagPackedSum constructs an output tensor by replacing every index in a
|
||||
/// given
|
||||
/// input tensor with a row (from the weights matrix) at that index
|
||||
///
|
||||
/// \param emb_table Tensor containing the embedding lookup table of the module of
|
||||
/// shape [num_emb, emb_dim1, emb_dim2, ...] and of type T
|
||||
/// \param indices Tensor of shape `[batch, indices_per_bag]` and of type *T_IND*.
|
||||
/// Required.
|
||||
/// \param per_sample_weigths tensor of the same shape as indices and of type T.
|
||||
/// Each value in this tensor are multiplied with each
|
||||
/// value pooled from embedding table for each index. Optional.
|
||||
|
||||
EmbeddingBagPackedSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& per_sample_weights);
|
||||
|
||||
EmbeddingBagPackedSum(const Output<Node>& emb_table, const Output<Node>& indices);
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
} // namespace v3
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/util/binary_elementwise_comparison.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
// clang-format off
|
||||
/// \brief Elementwise is-equal operation.
|
||||
///
|
||||
/// ## Inputs
|
||||
///
|
||||
/// | | Type | Description |
|
||||
/// | ------ | --------------------------------- | ------------------------------------------------------ |
|
||||
/// | `arg0` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of any shape and element type. |
|
||||
/// | `arg1` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of the same shape and element type as `arg0`. |
|
||||
/// | `autob`| AutoBroadcastSpec | Auto broadcast specification. |
|
||||
///
|
||||
/// ## Output
|
||||
///
|
||||
/// | Type | Description |
|
||||
/// | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
/// | \f$\texttt{bool}[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = 1\text{ if }\texttt{arg0}[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{, else } 0\f$ |
|
||||
// clang-format on
|
||||
class OPENVINO_API Equal : public util::BinaryElementwiseComparison {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs an equal operation.
|
||||
Equal() : util::BinaryElementwiseComparison(AutoBroadcastSpec::NUMPY) {}
|
||||
/// \brief Constructs an equal operation.
|
||||
///
|
||||
/// \param arg0 Node that produces the first input tensor.
|
||||
/// \param arg1 Node that produces the second input tensor.
|
||||
/// \param auto_broadcast Auto broadcast specification
|
||||
Equal(const Output<Node>& arg0,
|
||||
const Output<Node>& arg1,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY));
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
} // namespace v1
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/util/unary_elementwise_arithmetic.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Elementwise erf operation.
|
||||
class OPENVINO_API Erf : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs a floor operation.
|
||||
Erf() = default;
|
||||
/// \brief Constructs a floor operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
Erf(const Output<Node>& arg);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
} // namespace v0
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,32 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/util/unary_elementwise_arithmetic.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Elementwise natural exponential (exp) operation.
|
||||
class OPENVINO_API Exp : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs an exponential operation.
|
||||
Exp() = default;
|
||||
/// \brief Constructs an exponential operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
Exp(const Output<Node>& arg);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
} // namespace v0
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,74 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include "openvino/core/attribute_adapter.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronDetectionOutput performs
|
||||
/// non-maximum suppression to generate the detection output using
|
||||
/// information on location and score predictions.
|
||||
class OPENVINO_API ExperimentalDetectronDetectionOutput : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Structure that specifies attributes of the operation
|
||||
struct Attributes {
|
||||
// specifies score threshold
|
||||
float score_threshold;
|
||||
// specifies NMS threshold
|
||||
float nms_threshold;
|
||||
// specifies maximal delta of logarithms for width and height
|
||||
float max_delta_log_wh;
|
||||
// specifies number of detected classes
|
||||
int64_t num_classes;
|
||||
// specifies maximal number of detections per class
|
||||
int64_t post_nms_count;
|
||||
// specifies maximual number of detections per image
|
||||
size_t max_detections_per_image;
|
||||
// a flag specifies whether to delete background classes or not
|
||||
// `true` means background classes should be deleted,
|
||||
// `false` means background classes shouldn't be deleted.
|
||||
bool class_agnostic_box_regression;
|
||||
// specifies deltas of weights
|
||||
std::vector<float> deltas_weights;
|
||||
};
|
||||
|
||||
ExperimentalDetectronDetectionOutput() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronDetectionOutput operation.
|
||||
///
|
||||
/// \param input_rois Input rois
|
||||
/// \param input_deltas Input deltas
|
||||
/// \param input_scores Input scores
|
||||
/// \param input_im_info Input image info
|
||||
/// \param attrs Attributes attributes
|
||||
ExperimentalDetectronDetectionOutput(const Output<Node>& input_rois,
|
||||
const Output<Node>& input_deltas,
|
||||
const Output<Node>& input_scores,
|
||||
const Output<Node>& input_im_info,
|
||||
const Attributes& attrs);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
/// \brief Returns attributes of the operation ExperimentalDetectronDetectionOutput
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
};
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include "openvino/core/attribute_adapter.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronGenerateProposalsSingleImage
|
||||
/// computes ROIs and their scores based on input data.
|
||||
class OPENVINO_API ExperimentalDetectronGenerateProposalsSingleImage : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Structure that specifies attributes of the operation
|
||||
struct Attributes {
|
||||
// minimum box width & height
|
||||
float min_size;
|
||||
// specifies NMS threshold
|
||||
float nms_threshold;
|
||||
// number of top-n proposals after NMS
|
||||
int64_t post_nms_count;
|
||||
// number of top-n proposals before NMS
|
||||
int64_t pre_nms_count;
|
||||
};
|
||||
|
||||
ExperimentalDetectronGenerateProposalsSingleImage() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronGenerateProposalsSingleImage operation.
|
||||
///
|
||||
/// \param im_info Input image info
|
||||
/// \param anchors Input anchors
|
||||
/// \param deltas Input deltas
|
||||
/// \param scores Input scores
|
||||
/// \param attrs Operation attributes
|
||||
ExperimentalDetectronGenerateProposalsSingleImage(const Output<Node>& im_info,
|
||||
const Output<Node>& anchors,
|
||||
const Output<Node>& deltas,
|
||||
const Output<Node>& scores,
|
||||
const Attributes& attrs);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
};
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,67 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include "openvino/core/attribute_adapter.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronPriorGridGenerator generates prior
|
||||
/// grids of specified sizes.
|
||||
class OPENVINO_API ExperimentalDetectronPriorGridGenerator : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Structure that specifies attributes of the operation
|
||||
struct Attributes {
|
||||
// Specifies whether the output tensor should be 2D or 4D
|
||||
// `true` means the output tensor should be 2D tensor,
|
||||
// `false` means the output tensor should be 4D tensor.
|
||||
bool flatten;
|
||||
// Specifies number of cells of the generated grid with respect to height.
|
||||
int64_t h;
|
||||
// Specifies number of cells of the generated grid with respect to width.
|
||||
int64_t w;
|
||||
// Specifies the step of generated grid with respect to x coordinate
|
||||
float stride_x;
|
||||
// Specifies the step of generated grid with respect to y coordinate
|
||||
float stride_y;
|
||||
};
|
||||
|
||||
ExperimentalDetectronPriorGridGenerator() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronDetectionOutput operation.
|
||||
///
|
||||
/// \param priors Input priors
|
||||
/// \param feature_map Input feature map
|
||||
/// \param im_data Image data
|
||||
/// \param attrs attributes
|
||||
ExperimentalDetectronPriorGridGenerator(const Output<Node>& priors,
|
||||
const Output<Node>& feature_map,
|
||||
const Output<Node>& im_data,
|
||||
const Attributes& attrs);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
/// \brief Returns attributes of this operation.
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
|
||||
void validate();
|
||||
};
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,59 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include "openvino/core/attribute_adapter.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronROIFeatureExtractor
|
||||
/// is the ROIAlign operation applied over a feature pyramid.
|
||||
class OPENVINO_API ExperimentalDetectronROIFeatureExtractor : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Structure that specifies attributes of the operation
|
||||
struct Attributes {
|
||||
int64_t output_size;
|
||||
int64_t sampling_ratio;
|
||||
std::vector<int64_t> pyramid_scales;
|
||||
bool aligned;
|
||||
};
|
||||
|
||||
ExperimentalDetectronROIFeatureExtractor() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronROIFeatureExtractor operation.
|
||||
///
|
||||
/// \param args Inputs of ExperimentalDetectronROIFeatureExtractor
|
||||
/// \param attrs Operation attributes
|
||||
ExperimentalDetectronROIFeatureExtractor(const OutputVector& args, const Attributes& attrs);
|
||||
|
||||
/// \brief Constructs a ExperimentalDetectronROIFeatureExtractor operation.
|
||||
///
|
||||
/// \param args Inputs of ExperimentalDetectronROIFeatureExtractor
|
||||
/// \param attrs Operation attributes
|
||||
ExperimentalDetectronROIFeatureExtractor(const NodeVector& args, const Attributes& attrs);
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
/// \brief Returns attributes of the operation.
|
||||
const Attributes& get_attrs() const {
|
||||
return m_attrs;
|
||||
}
|
||||
|
||||
private:
|
||||
Attributes m_attrs;
|
||||
};
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include "openvino/core/attribute_adapter.hpp"
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v6 {
|
||||
/// \brief An operation ExperimentalDetectronTopKROIs, according to the repository
|
||||
/// is TopK operation applied to probabilities of input ROIs.
|
||||
class OPENVINO_API ExperimentalDetectronTopKROIs : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
ExperimentalDetectronTopKROIs() = default;
|
||||
/// \brief Constructs a ExperimentalDetectronTopKROIs operation.
|
||||
///
|
||||
/// \param input_rois Input rois
|
||||
/// \param rois_probs Probabilities for input rois
|
||||
/// \param max_rois Maximal numbers of output rois
|
||||
ExperimentalDetectronTopKROIs(const Output<Node>& input_rois, const Output<Node>& rois_probs, size_t max_rois = 0);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
size_t get_max_rois() const {
|
||||
return m_max_rois;
|
||||
}
|
||||
|
||||
private:
|
||||
size_t m_max_rois;
|
||||
};
|
||||
} // namespace v6
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,70 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/op.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v3 {
|
||||
class OPENVINO_API ExtractImagePatches : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
ExtractImagePatches() = default;
|
||||
/// \brief Constructs a ExtractImagePatches operation
|
||||
///
|
||||
/// \param data 4-D Input data to extract image patches
|
||||
/// \param sizes Patch size in the format of [size_rows, size_cols]
|
||||
/// \param strides Patch movement stride in the format of [stride_rows, stride_cols]
|
||||
/// \param rates Element seleciton rate for creating a patch. in the format of
|
||||
/// [rate_rows, rate_cols]
|
||||
/// \param auto_pad Padding type. it can be any value from
|
||||
/// valid, same_lower, same_upper
|
||||
ExtractImagePatches(const Output<Node>& image,
|
||||
const ngraph::Shape& sizes,
|
||||
const Strides& strides,
|
||||
const ngraph::Shape& rates,
|
||||
const PadType& auto_pad);
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
const ngraph::Shape& get_sizes() const {
|
||||
return m_patch_sizes;
|
||||
}
|
||||
void set_sizes(const ngraph::Shape& sizes) {
|
||||
m_patch_sizes = sizes;
|
||||
}
|
||||
const Strides& get_strides() const {
|
||||
return m_patch_movement_strides;
|
||||
}
|
||||
void set_strides(const Strides& strides) {
|
||||
m_patch_movement_strides = strides;
|
||||
}
|
||||
const ngraph::Shape& get_rates() const {
|
||||
return m_patch_selection_rates;
|
||||
}
|
||||
void set_rates(const ngraph::Shape& rates) {
|
||||
m_patch_selection_rates = rates;
|
||||
}
|
||||
const PadType& get_auto_pad() const {
|
||||
return m_padding;
|
||||
}
|
||||
void set_auto_pad(PadType& padding) {
|
||||
m_padding = padding;
|
||||
}
|
||||
|
||||
private:
|
||||
ngraph::Shape m_patch_sizes;
|
||||
Strides m_patch_movement_strides;
|
||||
ngraph::Shape m_patch_selection_rates;
|
||||
PadType m_padding;
|
||||
};
|
||||
} // namespace v3
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,81 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/op.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
///
|
||||
/// \brief Class performing element-wise linear quantization.
|
||||
///
|
||||
/// \note Input floating point values are quantized into a discrete
|
||||
/// set of floating point values.
|
||||
///
|
||||
/// \paragraph Implementation This class creates a node which performs the following
|
||||
/// operation:
|
||||
///
|
||||
/// round((data - input_low) / (input_high - input_low) * (levels-1)) /
|
||||
/// (levels-1) * (output_high - output_low) + output_low
|
||||
///
|
||||
///
|
||||
class OPENVINO_API FakeQuantize : public Op {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
FakeQuantize();
|
||||
///
|
||||
/// \brief Constructs a FakeQuantize operation node.
|
||||
///
|
||||
/// \param[in] data The input data tensor.
|
||||
/// \param[in] input_low The minimum limit for input values.
|
||||
/// \param[in] input_high The maximum limit for input values.
|
||||
/// \param[in] output_low The minimum quantized value.
|
||||
/// \param[in] output_high The maximum quantized value.
|
||||
/// \param[in] levels The number of quantization levels.
|
||||
/// \param[in] auto_broadcast AutoBroadcast mode to be used for broadcasting
|
||||
/// limit values
|
||||
///
|
||||
FakeQuantize(const Output<Node>& data,
|
||||
const Output<Node>& input_low,
|
||||
const Output<Node>& input_high,
|
||||
const Output<Node>& output_low,
|
||||
const Output<Node>& output_high,
|
||||
std::size_t levels,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY));
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
std::size_t get_levels() const {
|
||||
return m_levels;
|
||||
}
|
||||
void set_levels(std::size_t levels) {
|
||||
m_levels = levels;
|
||||
}
|
||||
const AutoBroadcastSpec& get_auto_broadcast() const {
|
||||
return m_auto_broadcast;
|
||||
}
|
||||
void set_auto_broadcast(const AutoBroadcastSpec& auto_broadcast) {
|
||||
m_auto_broadcast = auto_broadcast;
|
||||
}
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
bool constant_fold(OutputVector& output_values, const OutputVector& inputs_values) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
std::size_t m_levels;
|
||||
AutoBroadcastSpec m_auto_broadcast = op::AutoBroadcastType::NUMPY;
|
||||
};
|
||||
} // namespace v0
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/util/unary_elementwise_arithmetic.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v0 {
|
||||
/// \brief Elementwise floor operation.
|
||||
class OPENVINO_API Floor : public util::UnaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs a floor operation.
|
||||
Floor() = default;
|
||||
/// \brief Constructs a floor operation.
|
||||
///
|
||||
/// \param arg Node that produces the input tensor.
|
||||
Floor(const Output<Node>& arg);
|
||||
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
} // namespace v0
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvino/op/util/binary_elementwise_arithmetic.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace op {
|
||||
namespace v1 {
|
||||
/// \brief Elementwise FloorMod operation.
|
||||
///
|
||||
class OPENVINO_API FloorMod : public util::BinaryElementwiseArithmetic {
|
||||
public:
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
|
||||
/// \brief Constructs an uninitialized addition operation
|
||||
FloorMod() : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NUMPY){};
|
||||
|
||||
/// \brief Constructs an Floor Mod operation.
|
||||
///
|
||||
/// \param arg0 Output that produces the first input tensor.<br>
|
||||
/// `[d0, ...]`
|
||||
/// \param arg1 Output that produces the second input tensor.<br>
|
||||
/// `[d0, ...]`
|
||||
/// \param auto_broadcast Auto broadcast specification
|
||||
///
|
||||
/// Output `[d0, ...]`
|
||||
///
|
||||
FloorMod(const Output<Node>& arg0,
|
||||
const Output<Node>& arg1,
|
||||
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastType::NUMPY);
|
||||
|
||||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override;
|
||||
bool has_evaluate() const override;
|
||||
};
|
||||
} // namespace v1
|
||||
} // namespace op
|
||||
} // namespace ov
|
||||
@@ -13,10 +13,7 @@ namespace util {
|
||||
/// \brief Returns embeddings for given indices
|
||||
class OPENVINO_API EmbeddingBagOffsetsBase : public Op {
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"EmbeddingBagOffsetsBase", 3};
|
||||
const NodeTypeInfo& get_type_info() const override {
|
||||
return type_info;
|
||||
}
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs a EmbeddingBagOffsetsBase operation.
|
||||
EmbeddingBagOffsetsBase() = default;
|
||||
/// \brief Constructs a EmbeddingBagOffsetsBase operation.
|
||||
|
||||
@@ -13,10 +13,7 @@ namespace util {
|
||||
/// \brief Returns embeddings for given indices
|
||||
class OPENVINO_API EmbeddingBagPackedBase : public Op {
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"EmbeddingBagPackedBase", 3};
|
||||
const NodeTypeInfo& get_type_info() const override {
|
||||
return type_info;
|
||||
}
|
||||
OPENVINO_RTTI_DECLARATION;
|
||||
/// \brief Constructs a EmbeddingBagPackedBase operation.
|
||||
EmbeddingBagPackedBase() = default;
|
||||
/// \brief Constructs a EmbeddingBagPackedBase operation.
|
||||
|
||||
@@ -14,8 +14,14 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v1::DeformableConvolution, "DeformableConvolution", 1, op::util::DeformableConvolutionBase);
|
||||
NGRAPH_RTTI_DEFINITION(op::v8::DeformableConvolution, "DeformableConvolution", 8, op::util::DeformableConvolutionBase);
|
||||
OPENVINO_RTTI_DEFINITION(op::v1::DeformableConvolution,
|
||||
"DeformableConvolution",
|
||||
1,
|
||||
op::util::DeformableConvolutionBase);
|
||||
OPENVINO_RTTI_DEFINITION(op::v8::DeformableConvolution,
|
||||
"DeformableConvolution",
|
||||
8,
|
||||
op::util::DeformableConvolutionBase);
|
||||
|
||||
op::v8::DeformableConvolution::DeformableConvolution(const Output<Node>& arg,
|
||||
const Output<Node>& offsets,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v1::DeformablePSROIPooling, "DeformablePSROIPooling", 1);
|
||||
OPENVINO_RTTI_DEFINITION(op::v1::DeformablePSROIPooling, "DeformablePSROIPooling", 1);
|
||||
|
||||
op::v1::DeformablePSROIPooling::DeformablePSROIPooling(const Output<Node>& input,
|
||||
const Output<Node>& coords,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v0::DepthToSpace, "DepthToSpace", 0);
|
||||
OPENVINO_RTTI_DEFINITION(op::v0::DepthToSpace, "DepthToSpace", 0);
|
||||
|
||||
op::DepthToSpace::DepthToSpace(const Output<Node>& data, const DepthToSpaceMode& mode, const size_t block_size)
|
||||
: Op({data}),
|
||||
@@ -113,7 +113,7 @@ bool op::DepthToSpace::has_evaluate() const {
|
||||
return !get_input_partial_shape(0).is_dynamic();
|
||||
}
|
||||
|
||||
std::ostream& ngraph::operator<<(std::ostream& s, const op::DepthToSpace::DepthToSpaceMode& type) {
|
||||
std::ostream& ov::operator<<(std::ostream& s, const ov::op::v0::DepthToSpace::DepthToSpaceMode& type) {
|
||||
return s << as_string(type);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,31 +7,30 @@
|
||||
#include "itt.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::DetectionOutput, "DetectionOutput", 0);
|
||||
OPENVINO_RTTI_DEFINITION(ov::op::v0::DetectionOutput, "DetectionOutput", 0);
|
||||
|
||||
op::DetectionOutput::DetectionOutput(const Output<Node>& box_logits,
|
||||
const Output<Node>& class_preds,
|
||||
const Output<Node>& proposals,
|
||||
const Output<Node>& aux_class_preds,
|
||||
const Output<Node>& aux_box_preds,
|
||||
const DetectionOutputAttrs& attrs)
|
||||
ov::op::v0::DetectionOutput::DetectionOutput(const Output<Node>& box_logits,
|
||||
const Output<Node>& class_preds,
|
||||
const Output<Node>& proposals,
|
||||
const Output<Node>& aux_class_preds,
|
||||
const Output<Node>& aux_box_preds,
|
||||
const Attributes& attrs)
|
||||
: Op({box_logits, class_preds, proposals, aux_class_preds, aux_box_preds}),
|
||||
m_attrs(attrs) {
|
||||
constructor_validate_and_infer_types();
|
||||
}
|
||||
|
||||
op::DetectionOutput::DetectionOutput(const Output<Node>& box_logits,
|
||||
const Output<Node>& class_preds,
|
||||
const Output<Node>& proposals,
|
||||
const DetectionOutputAttrs& attrs)
|
||||
ov::op::v0::DetectionOutput::DetectionOutput(const Output<Node>& box_logits,
|
||||
const Output<Node>& class_preds,
|
||||
const Output<Node>& proposals,
|
||||
const Attributes& attrs)
|
||||
: Op({box_logits, class_preds, proposals}),
|
||||
m_attrs(attrs) {
|
||||
constructor_validate_and_infer_types();
|
||||
}
|
||||
|
||||
void op::DetectionOutput::validate_and_infer_types() {
|
||||
void ov::op::v0::DetectionOutput::validate_and_infer_types() {
|
||||
NGRAPH_OP_SCOPE(v0_DetectionOutput_validate_and_infer_types);
|
||||
NODE_VALIDATION_CHECK(this, m_attrs.num_classes > 0, "Number of classes must be greater than zero");
|
||||
|
||||
@@ -205,12 +204,12 @@ void op::DetectionOutput::validate_and_infer_types() {
|
||||
} else {
|
||||
output_shape.push_back(num_images * num_prior_boxes * m_attrs.num_classes);
|
||||
}
|
||||
output_shape.push_back(7);
|
||||
output_shape.emplace_back(7);
|
||||
|
||||
set_output_type(0, box_logits_et, output_shape);
|
||||
}
|
||||
|
||||
shared_ptr<Node> op::DetectionOutput::clone_with_new_inputs(const OutputVector& new_args) const {
|
||||
shared_ptr<ov::Node> ov::op::v0::DetectionOutput::clone_with_new_inputs(const OutputVector& new_args) const {
|
||||
NGRAPH_OP_SCOPE(v0_DetectionOutput_clone_with_new_inputs);
|
||||
check_new_args_count(this, new_args);
|
||||
|
||||
@@ -230,7 +229,7 @@ shared_ptr<Node> op::DetectionOutput::clone_with_new_inputs(const OutputVector&
|
||||
}
|
||||
}
|
||||
|
||||
bool op::DetectionOutput::visit_attributes(AttributeVisitor& visitor) {
|
||||
bool ov::op::v0::DetectionOutput::visit_attributes(AttributeVisitor& visitor) {
|
||||
NGRAPH_OP_SCOPE(v0_DetectionOutput_visit_attributes);
|
||||
visitor.on_attribute("num_classes", m_attrs.num_classes);
|
||||
visitor.on_attribute("background_label_id", m_attrs.background_label_id);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v7::DFT, "DFT", 7, util::FFTBase);
|
||||
OPENVINO_RTTI_DEFINITION(op::v7::DFT, "DFT", 7, util::FFTBase);
|
||||
|
||||
op::v7::DFT::DFT(const Output<Node>& data, const Output<Node>& axes) : FFTBase(data, axes) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
||||
@@ -53,7 +53,7 @@ bool evaluate_divide(const HostTensorPtr& arg0,
|
||||
|
||||
// ------------------------------ v1 -------------------------------------------
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v1::Divide, "Divide", 1, util::BinaryElementwiseArithmetic);
|
||||
OPENVINO_RTTI_DEFINITION(op::v1::Divide, "Divide", 1, util::BinaryElementwiseArithmetic);
|
||||
|
||||
op::v1::Divide::Divide(const Output<Node>& arg0, const Output<Node>& arg1, const AutoBroadcastSpec& auto_broadcast)
|
||||
: BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v7::Einsum, "Einsum", 7);
|
||||
OPENVINO_RTTI_DEFINITION(op::v7::Einsum, "Einsum", 7);
|
||||
|
||||
op::v7::Einsum::Einsum(const OutputVector& inputs, const std::string& equation) : Op(inputs), m_equation(equation) {
|
||||
// normalize input equation by removing extra white-spaces from the equation
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::Elu, "Elu", 0);
|
||||
OPENVINO_RTTI_DEFINITION(op::v0::Elu, "Elu", 0);
|
||||
|
||||
op::Elu::Elu(const Output<Node>& data, const double alpha) : Op({data}), m_alpha{alpha} {
|
||||
constructor_validate_and_infer_types();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
constexpr NodeTypeInfo op::v3::EmbeddingSegmentsSum::type_info;
|
||||
OPENVINO_RTTI_DEFINITION(op::v3::EmbeddingSegmentsSum, "EmbeddingSegmentsSum", 3);
|
||||
|
||||
op::v3::EmbeddingSegmentsSum::EmbeddingSegmentsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
constexpr NodeTypeInfo op::v3::EmbeddingBagOffsetsSum::type_info;
|
||||
OPENVINO_RTTI_DEFINITION(op::v3::EmbeddingBagOffsetsSum, "EmbeddingBagOffsetsSum", 3, util::EmbeddingBagOffsetsBase);
|
||||
|
||||
op::v3::EmbeddingBagOffsetsSum::EmbeddingBagOffsetsSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
constexpr NodeTypeInfo op::v3::EmbeddingBagPackedSum::type_info;
|
||||
OPENVINO_RTTI_DEFINITION(op::v3::EmbeddingBagPackedSum, "EmbeddingBagPackedSum", 3, util::EmbeddingBagPackedBase);
|
||||
|
||||
op::v3::EmbeddingBagPackedSum::EmbeddingBagPackedSum(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
|
||||
@@ -50,7 +50,7 @@ bool evaluate_equal(const HostTensorPtr& arg0,
|
||||
|
||||
//------------------------------- v1 -------------------------------------------
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v1::Equal, "Equal", 1, op::util::BinaryElementwiseComparison);
|
||||
OPENVINO_RTTI_DEFINITION(op::v1::Equal, "Equal", 1, op::util::BinaryElementwiseComparison);
|
||||
|
||||
op::v1::Equal::Equal(const Output<Node>& arg0, const Output<Node>& arg1, const AutoBroadcastSpec& auto_broadcast)
|
||||
: BinaryElementwiseComparison(arg0, arg1, auto_broadcast) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v0::Erf, "Erf", 0, util::UnaryElementwiseArithmetic);
|
||||
OPENVINO_RTTI_DEFINITION(op::v0::Erf, "Erf", 0, util::UnaryElementwiseArithmetic);
|
||||
|
||||
bool ngraph::op::v0::Erf::visit_attributes(AttributeVisitor& visitor) {
|
||||
NGRAPH_OP_SCOPE(v0_Erf_visit_attributes);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::Exp, "Exp", 0, UnaryElementwiseArithmetic);
|
||||
OPENVINO_RTTI_DEFINITION(op::v0::Exp, "Exp", 0, UnaryElementwiseArithmetic);
|
||||
|
||||
op::Exp::Exp(const Output<Node>& arg) : UnaryElementwiseArithmetic(arg) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v6::ExperimentalDetectronDetectionOutput, "ExperimentalDetectronDetectionOutput", 6);
|
||||
OPENVINO_RTTI_DEFINITION(op::v6::ExperimentalDetectronDetectionOutput, "ExperimentalDetectronDetectionOutput", 6);
|
||||
|
||||
op::v6::ExperimentalDetectronDetectionOutput::ExperimentalDetectronDetectionOutput(const Output<Node>& input_rois,
|
||||
const Output<Node>& input_deltas,
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v6::ExperimentalDetectronGenerateProposalsSingleImage,
|
||||
"ExperimentalDetectronGenerateProposalsSingleImage",
|
||||
6);
|
||||
OPENVINO_RTTI_DEFINITION(op::v6::ExperimentalDetectronGenerateProposalsSingleImage,
|
||||
"ExperimentalDetectronGenerateProposalsSingleImage",
|
||||
6);
|
||||
|
||||
op::v6::ExperimentalDetectronGenerateProposalsSingleImage::ExperimentalDetectronGenerateProposalsSingleImage(
|
||||
const Output<Node>& im_info,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v6::ExperimentalDetectronPriorGridGenerator, "ExperimentalDetectronPriorGridGenerator", 6);
|
||||
OPENVINO_RTTI_DEFINITION(op::v6::ExperimentalDetectronPriorGridGenerator, "ExperimentalDetectronPriorGridGenerator", 6);
|
||||
|
||||
op::v6::ExperimentalDetectronPriorGridGenerator::ExperimentalDetectronPriorGridGenerator(
|
||||
const Output<Node>& priors,
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v6::ExperimentalDetectronROIFeatureExtractor, "ExperimentalDetectronROIFeatureExtractor", 6);
|
||||
OPENVINO_RTTI_DEFINITION(op::v6::ExperimentalDetectronROIFeatureExtractor,
|
||||
"ExperimentalDetectronROIFeatureExtractor",
|
||||
6);
|
||||
|
||||
op::v6::ExperimentalDetectronROIFeatureExtractor::ExperimentalDetectronROIFeatureExtractor(const OutputVector& args,
|
||||
const Attributes& attrs)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v6::ExperimentalDetectronTopKROIs, "ExperimentalDetectronTopKROIs", 6);
|
||||
OPENVINO_RTTI_DEFINITION(op::v6::ExperimentalDetectronTopKROIs, "ExperimentalDetectronTopKROIs", 6);
|
||||
|
||||
op::v6::ExperimentalDetectronTopKROIs::ExperimentalDetectronTopKROIs(const Output<Node>& input_rois,
|
||||
const Output<Node>& rois_probs,
|
||||
|
||||
@@ -12,7 +12,7 @@ using namespace ngraph;
|
||||
|
||||
// ExtractImagePatches v3
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v3::ExtractImagePatches, "ExtractImagePatches", 3);
|
||||
OPENVINO_RTTI_DEFINITION(op::v3::ExtractImagePatches, "ExtractImagePatches", 3);
|
||||
|
||||
op::v3::ExtractImagePatches::ExtractImagePatches(const Output<Node>& image,
|
||||
const Shape& sizes,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::FakeQuantize, "FakeQuantize", 0);
|
||||
OPENVINO_RTTI_DEFINITION(op::v0::FakeQuantize, "FakeQuantize", 0);
|
||||
|
||||
op::FakeQuantize::FakeQuantize() : Op(), m_levels() {}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v0::Floor, "Floor", 0, util::UnaryElementwiseArithmetic);
|
||||
OPENVINO_RTTI_DEFINITION(op::v0::Floor, "Floor", 0, util::UnaryElementwiseArithmetic);
|
||||
|
||||
op::Floor::Floor(const Output<Node>& arg) : UnaryElementwiseArithmetic(arg) {
|
||||
constructor_validate_and_infer_types();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
NGRAPH_RTTI_DEFINITION(op::v1::FloorMod, "FloorMod", 1, op::util::BinaryElementwiseArithmetic);
|
||||
OPENVINO_RTTI_DEFINITION(op::v1::FloorMod, "FloorMod", 1, op::util::BinaryElementwiseArithmetic);
|
||||
|
||||
op::v1::FloorMod::FloorMod(const Output<Node>& arg0, const Output<Node>& arg1, const AutoBroadcastSpec& auto_broadcast)
|
||||
: BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
constexpr ov::NodeTypeInfo ov::op::util::EmbeddingBagOffsetsBase::type_info;
|
||||
OPENVINO_RTTI_DEFINITION(ov::op::util::EmbeddingBagOffsetsBase, "EmbeddingBagOffsetsBase", 3);
|
||||
|
||||
ov::op::util::EmbeddingBagOffsetsBase::EmbeddingBagOffsetsBase(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
constexpr ov::NodeTypeInfo ov::op::util::EmbeddingBagPackedBase::type_info;
|
||||
OPENVINO_RTTI_DEFINITION(ov::op::util::EmbeddingBagPackedBase, "EmbeddingBagPackedBase", 3);
|
||||
|
||||
ov::op::util::EmbeddingBagPackedBase::EmbeddingBagPackedBase(const Output<Node>& emb_table,
|
||||
const Output<Node>& indices,
|
||||
|
||||
Reference in new issue
Block a user