21 #include "ngraph/attribute_adapter.hpp"
22 #include "ngraph/op/op.hpp"
23 #include "ngraph/op/util/attr_types.hpp"
43 bool align_corners =
true;
45 bool antialias =
false;
48 std::vector<size_t> pads_begin;
51 std::vector<size_t> pads_end;
58 NGRAPH_RTTI_DECLARATION;
60 enum class InterpolateMode
81 virtual std::shared_ptr<Node>
82 clone_with_new_inputs(
const OutputVector& new_args)
const override;
95 NGRAPH_RTTI_DECLARATION;
129 tf_half_pixel_for_nn,
154 std::vector<size_t> pads_begin;
158 std::vector<size_t> pads_end;
163 CoordinateTransformMode::half_pixel;
167 NearestMode nearest_mode = NearestMode::round_prefer_floor;
169 bool antialias =
false;
173 double cube_coeff = -0.75f;
179 std::vector<size_t> pads_begin,
180 std::vector<size_t> pads_end,
182 CoordinateTransformMode::half_pixel,
183 NearestMode nearest_mode = NearestMode::round_prefer_floor,
184 bool antialias =
false,
185 double cube_coeff = -0.75)
187 , shape_calculation_mode(shape_calculation_mode)
188 , pads_begin(pads_begin)
190 , coordinate_transformation_mode(coordinate_transformation_mode)
191 , nearest_mode(nearest_mode)
192 , antialias(antialias)
193 , cube_coeff(cube_coeff)
226 virtual std::shared_ptr<Node>
227 clone_with_new_inputs(
const OutputVector& new_args)
const override;
229 const HostTensorVector& inputs)
const override;
237 bool evaluate_interpolate(
const HostTensorVector& outputs,
238 const HostTensorVector& inputs)
const;
270 const std::vector<int64_t>& axes,
271 const std::vector<float>& scales,
280 const std::vector<int64_t>& axes,
281 const std::vector<int64_t>& sizes)
const;
284 NGRAPH_SUPPRESS_DEPRECATED_START
287 NGRAPH_SUPPRESS_DEPRECATED_END
292 std::ostream& operator<<(std::ostream& s,
const op::v0::Interpolate::InterpolateMode& type);
305 "AttributeAdapter<op::v0::Interpolate::InterpolateMode>", 0};
306 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
325 "AttributeAdapter<op::v4::Interpolate::InterpolateMode>", 4};
326 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
330 std::ostream& operator<<(std::ostream& s,
344 "AttributeAdapter<op::v4::Interpolate::CoordinateTransformMode>", 4};
345 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
362 "AttributeAdapter<op::v4::Interpolate::NearestMode>", 4};
363 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
380 "AttributeAdapter<op::v4::Interpolate::ShapeCalcMode>", 4};
381 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:171
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:71
A set of axes.
Definition: axis_set.hpp:31
Access an enum via a string.
Definition: attribute_adapter.hpp:178
A handle for one of a node's outputs.
Definition: node_output.hpp:42
Class representing a shape that may be partially or totally dynamic.
Definition: partial_shape.hpp:46
Root of all actual ops.
Definition: op.hpp:29
Layer which performs bilinear interpolation.
Definition: interpolate.hpp:56
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:93
InterpolateMode
Interpolation mode.
Definition: interpolate.hpp:114
CoordinateTransformMode
Mode of the calculation of the source coordinate from resized one.
Definition: interpolate.hpp:125
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:102
NearestMode
Round modes for the nearest interpolation.
Definition: interpolate.hpp:135
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28
Structure that specifies attributes for interpolation.
Definition: interpolate.hpp:33
Definition: interpolate.hpp:144