openvino.runtime.opset7.interpolate#
- openvino.runtime.opset7.interpolate(image: Node, output_shape: Node | int | float | ndarray, attrs: dict, name: str | None = None) Node #
Perform interpolation of independent slices in input tensor.
- Parameters:
image – The node providing input tensor with data for interpolation.
output_shape – 1D tensor describing output shape for spatial axes.
attrs – The dictionary containing key, value pairs for attributes.
name – Optional name for the output node.
- Returns:
Node representing interpolation operation.
Available attributes are:
- axes Specify spatial dimension indices where interpolation is applied.
Type: List of non-negative integer numbers. Required: yes.
- mode Specifies type of interpolation.
Range of values: one of {nearest, linear, cubic, area} Type: string Required: yes
- align_corners A flag that specifies whether to align corners or not. True means the
alignment is applied, False means the alignment isn’t applied. Range of values: True or False. Default: True. Required: no
- antialias A flag that specifies whether to perform anti-aliasing.
- Range of values: False - do not perform anti-aliasing
True - perform anti-aliasing
Default value: False Required: no
- pads_begin Specify the number of pixels to add to the beginning of the image being
interpolated. A scalar that specifies padding for each spatial dimension. Range of values: list of non-negative integer numbers. Default value: 0 Required: no
- pads_end Specify the number of pixels to add to the beginning of the image being
interpolated. A scalar that specifies padding for each spatial dimension. Range of values: list of non-negative integer numbers. Default value: 0 Required: no
Example of attribute dictionary:
# just required ones attrs = { 'axes': [2, 3], 'mode': 'cubic', } attrs = { 'axes': [2, 3], 'mode': 'cubic', 'antialias': True, 'pads_begin': [2, 2, 2], }
Optional attributes which are absent from dictionary will be set with corresponding default.