namespace ov::op::interpolate

Overview

namespace interpolate {

// namespaces

namespace ov::op::interpolate::validate;

// global functions

template <
    class T,
    class U,
    typename std::enable_if<std::is_same<T, U>::value>::type \* = nullptr
    >
constexpr bool is_same_instance(
    const T& lhs,
    const U& rhs
    );

template <class TContainer>
void resize_padding(
    const ov::op::util::InterpolateBase \* op,
    size_t input_rank,
    TContainer& pads_begin,
    TContainer& pads_end
    );

template <class TShape, class TInputIter, class TRShape = result_shape_t<TShape>>
TRShape make_padded_shape(
    const TShape& input,
    TInputIter pads_begin,
    TInputIter pads_end
    );

template <class TShape, class TRes = std::vector<int64_t>>
std::unique_ptr<TRes> get_axes(
    const Node \*const op,
    size_t port,
    bool has_axes,
    size_t rank,
    const ITensorAccessor& ta
    );

template <class TShape, class TContainer>
void set_undefined_dim_on_axes(
    TShape& out,
    TContainer& axes
    );

template <class TShape, class TContainer>
void update_dims_with_sizes_on_axes(
    TShape& out_shape,
    const TContainer& axes,
    const Node \*const op,
    const size_t port,
    const ITensorAccessor& ta
    );

template <class TShape>
void update_dims_with_scales_on_axes(
    TShape& out_shape,
    const std::vector<int64_t>& axes,
    const Node \*const op,
    const size_t port,
    const ITensorAccessor& ta
    );

} // namespace interpolate

Detailed Documentation

Global Functions

template <class TContainer>
void resize_padding(
    const ov::op::util::InterpolateBase \* op,
    size_t input_rank,
    TContainer& pads_begin,
    TContainer& pads_end
    )

Resize padding to input rank.

Parameters:

TContainer

Pads container type.

op

Pointer to base of interpolate.

input_rank

Expected padding size.

pads_begin

Begin padding container.

pads_end

End padding container.

template <class TShape, class TInputIter, class TRShape = result_shape_t<TShape>>
TRShape make_padded_shape(
    const TShape& input,
    TInputIter pads_begin,
    TInputIter pads_end
    )

Makes padded shape from input shapes and padding values.

The input shape must be static rank and padding count must match input shape rank.

Parameters:

input

Input shape used as source for output result.

pads_begin

Dimensions begin padding values.

pads_end

Dimensions end padding values.

Returns:

TShape Shape with dimensions of input plus paddings.

template <class TShape, class TRes = std::vector<int64_t>>
std::unique_ptr<TRes> get_axes(
    const Node \*const op,
    size_t port,
    bool has_axes,
    size_t rank,
    const ITensorAccessor& ta
    )

Get the axes for interpolate from constant input or default value if op has no axes input.

Parameters:

op

Pointer to operator.

port

Axes input port number.

has_axes

Flag if op has input with axes.

rank

input shape used for axes values validation.

ta

Tensor accessor for input data.

Returns:

Not null pointer with axes values or null pointer if can’t get axes from input.

template <class TShape, class TContainer>
void set_undefined_dim_on_axes(
    TShape& out,
    TContainer& axes
    )

Set the undefined dimensions on specified axes.

Parameters:

out

Output shape to update.

axes

List of axes for update.

template <class TShape, class TContainer>
void update_dims_with_sizes_on_axes(
    TShape& out_shape,
    const TContainer& axes,
    const Node \*const op,
    const size_t port,
    const ITensorAccessor& ta
    )

Update output shape with dimension size from input on specified axes.

Parameters:

out_shape

Output shape to be updated.

axes

List of axes for dimension update.

op

Pointer to operator.

port

Sizes/output target shape input with values

ta

Tensor accessor.

template <class TShape>
void update_dims_with_scales_on_axes(
    TShape& out_shape,
    const std::vector<int64_t>& axes,
    const Node \*const op,
    const size_t port,
    const ITensorAccessor& ta
    )

Update output shape by scaling dimensions on axes.

Parameters:

out_shape

Output shape to update.

axes

List of axes to scale dimension.

op

Pointer to operator.

port

Scales input port number with values.

ta

Tensor accessor.