Files
openvino/docs/ops/image/Interpolate_1.md
Pawel Raasz 5299c3378b Review interpolate for shape inference aspects (#17667)
* Review interpolate shapes and label propagation

* Review shape_infer template implementation

* Update shape infer of interpolate in GPU plugin
- Add new tensor accessor for ov::Tensor map

* Correct casting in dim::scale function

* Remove validation of size of input 1 in v0

* Relax inputs check for interpolate v4

* Correct GPU shape inference

* Use ov::Tensors in interpolate's evaluate
- Remove some duplicated code
- Apply comments from review

* Set shape in interpolate's eval for output tensor
2023-05-30 14:49:54 +04:00

3.4 KiB

Interpolate

@sphinxdirective

Versioned name: Interpolate-1

Category: Image processing

Short description: Interpolate layer performs interpolation of independent slices in input tensor by specified dimensions and attributes.

Attributes

  • axes

    • Description: axes specify spatial dimension indices where interpolation is applied. Other dimensions are treated as batch dimensions. The order of elements in axes attribute matters and mapped directly to elements with the same indices in the 2nd input target_spatial_shape.
    • Range of values: list of non-negative integer numbers
    • Type: int[]
    • Required: yes
  • mode

    • Description: specifies type of interpolation
    • Range of values: one of nearest, linear, cubic, area
    • Type: string
    • Required: yes
  • align_corners

    • Description: align_corners is a flag that specifies whether to align corners or not. 1 means the alignment is applied, 0 means the alignment isn't applied.
    • Range of values: true or false
    • Type: boolean
    • Default value: true
    • Required: no
  • antialias

    • Description: antialias is a flag that specifies whether to perform anti-aliasing.
    • Range of values:
      • false - do not perform anti-aliasing
      • true - perform anti-aliasing
    • Type: boolean
    • Default value: false
    • Required: no
  • pads_begin

    • Description: pads_beg specify the number of pixels to add to the beginning of the image being interpolated. This is a scalar that specifies padding for each spatial dimension.
    • Range of values: list of non-negative integer numbers
    • Type: int
    • Default value: 0
    • Required: no
  • pads_end

    • Description: pads_end specify the number of pixels to add to the beginning of the image being interpolated. This is a scalar that specifies padding for each spatial dimension.
    • Range of values: list of non-negative integer numbers
    • Type: int
    • Default value: 0
    • Required: no

Inputs

  • 1: data - Input tensor with data for interpolation. Type of elements is any supported floating-point type. Required.

  • 2: target_spatial_shape - 1D tensor describing output shape for spatial axes. Number of elements matches the number of indices in axes attribute, the order matches as well. Required.

Outputs

  • 1: Resulting interpolated tensor with elements of the same type as input data tensor. The shape of the output matches input data shape except spatial dimensions mentioned in axes attribute. For other dimensions shape matches sizes from target_spatial_shape in order specified in axes.

Example

.. code-block:: cpp

<layer ... type="Interpolate" ...> 1 2 48 80 2  < !--The values in this input are [50, 60] --> 1 2 50 60

@endsphinxdirective