openvino.runtime.opset12.pad

openvino.runtime.opset12.pad(arg: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], pads_begin: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], pads_end: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], pad_mode: str, arg_pad_value: Optional[Union[openvino._pyopenvino.Node, int, float, numpy.ndarray]] = None, name: Optional[str] = None) openvino._pyopenvino.Node

Return a generic padding operation.

Parameters
  • arg – The node producing input tensor to be padded.

  • pads_begin – Number of padding elements to be added before position 0 on each axis of arg. Negative values are supported.

  • pads_end – Number of padding elements to be added after the last element. Negative values are supported.

  • pad_mode – “constant”, “edge”, “reflect” or “symmetric”

  • arg_pad_value – value used for padding if pad_mode is “constant”

Returns

Pad operation node.