9 #include "ngraph/attribute_adapter.hpp"
10 #include "ngraph/op/op.hpp"
11 #include "ngraph/op/util/attr_types.hpp"
31 bool align_corners =
true;
33 bool antialias =
false;
36 std::vector<size_t> pads_begin;
39 std::vector<size_t> pads_end;
46 NGRAPH_RTTI_DECLARATION;
48 enum class InterpolateMode
69 virtual std::shared_ptr<Node>
70 clone_with_new_inputs(
const OutputVector& new_args)
const override;
84 NGRAPH_RTTI_DECLARATION;
118 tf_half_pixel_for_nn,
143 std::vector<size_t> pads_begin;
147 std::vector<size_t> pads_end;
152 CoordinateTransformMode::half_pixel;
156 NearestMode nearest_mode = NearestMode::round_prefer_floor;
158 bool antialias =
false;
162 double cube_coeff = -0.75f;
168 std::vector<size_t> pads_begin,
169 std::vector<size_t> pads_end,
171 CoordinateTransformMode::half_pixel,
172 NearestMode nearest_mode = NearestMode::round_prefer_floor,
173 bool antialias =
false,
174 double cube_coeff = -0.75)
176 , shape_calculation_mode(shape_calculation_mode)
177 , pads_begin(pads_begin)
179 , coordinate_transformation_mode(coordinate_transformation_mode)
180 , nearest_mode(nearest_mode)
181 , antialias(antialias)
182 , cube_coeff(cube_coeff)
215 virtual std::shared_ptr<Node>
216 clone_with_new_inputs(
const OutputVector& new_args)
const override;
218 const HostTensorVector& inputs)
const override;
228 bool evaluate_interpolate(
const HostTensorVector& outputs,
229 const HostTensorVector& inputs)
const;
261 const std::vector<int64_t>& axes,
262 const std::vector<float>& scales,
271 const std::vector<int64_t>& axes,
272 const std::vector<int64_t>& sizes)
const;
282 std::ostream& operator<<(std::ostream& s,
const op::v0::Interpolate::InterpolateMode& type);
295 "AttributeAdapter<op::v0::Interpolate::InterpolateMode>", 0};
296 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
315 "AttributeAdapter<op::v4::Interpolate::InterpolateMode>", 4};
316 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
320 std::ostream& operator<<(std::ostream& s,
334 "AttributeAdapter<op::v4::Interpolate::CoordinateTransformMode>", 4};
335 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
352 "AttributeAdapter<op::v4::Interpolate::NearestMode>", 4};
353 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
370 "AttributeAdapter<op::v4::Interpolate::ShapeCalcMode>", 4};
371 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
An AttributeAdapter "captures" an attribute as an AT& and makes it available as a ValueAccessor<VAT>.
Definition: attribute_adapter.hpp:161
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:59
A set of axes.
Definition: axis_set.hpp:19
Access an enum via a string.
Definition: attribute_adapter.hpp:168
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Class representing a shape that may be partially or totally dynamic.
Definition: partial_shape.hpp:34
Root of all actual ops.
Definition: op.hpp:17
Layer which performs bilinear interpolation.
Definition: interpolate.hpp:44
Interpolate(const Output< Node > &image, const Output< Node > &output_shape, const InterpolateAttrs &attrs)
Constructs a Interpolate operation.
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
Definition: interpolate.hpp:82
bool has_evaluate() const override
Allows to get information about availability of evaluate method for the current operation.
InterpolateMode
Interpolation mode.
Definition: interpolate.hpp:103
CoordinateTransformMode
Mode of the calculation of the source coordinate from resized one.
Definition: interpolate.hpp:114
Interpolate(const Output< Node > &image, const Output< Node > &output_shape, const Output< Node > &scales, const InterpolateAttrs &attrs)
Constructs a Interpolate operation without 'axes' input.
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
std::vector< int64_t > get_axes() const
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs) const override
Evaluates the op on input_values putting results in output_values.
Interpolate(const Output< Node > &image, const Output< Node > &output_shape, const Output< Node > &scales, const Output< Node > &axes, const InterpolateAttrs &attrs)
Constructs a Interpolate operation with 'axes' input.
ShapeCalcMode
Shape calculation mode.
Definition: interpolate.hpp:91
NearestMode
Round modes for the nearest interpolation.
Definition: interpolate.hpp:124
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
Structure that specifies attributes for interpolation.
Definition: interpolate.hpp:21
Definition: interpolate.hpp:133