ngraph.grid_sample

ngraph.grid_sample(data: Union[_pyngraph.Node, int, float, numpy.ndarray], grid: Union[_pyngraph.Node, int, float, numpy.ndarray], attributes: dict, name: Optional[str] = None) _pyngraph.Node

Return a node which performs GridSample operation.

Parameters
  • data – The input image.

  • grid – Grid values (normalized input coordinates).

  • attributes – A dictionary containing GridSample’s attributes.

  • name – Optional name of the node.

Available attributes: * align_corners A flag which specifies whether to align the grid extrema values

with the borders or center points of the input tensor’s border pixels. Range of values: true, false Default value: false Required: no

  • mode Specifies the type of interpolation.

    Range of values: bilinear, bicubic, nearest Default value: bilinear Required: no

  • padding_mode Specifies how the out-of-bounds coordinates should be handled.

    Range of values: zeros, border, reflection Default value: zeros Required: no

Returns

A new GridSample node.