openvino.runtime.opset10.one_hot

openvino.runtime.opset10.one_hot(indices: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], depth: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], on_value: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], off_value: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], axis: int, name: Optional[str] = None) openvino._pyopenvino.Node

Create node performing one-hot encoding on input data.

Parameters
  • indices – Input tensor of rank N with indices of any supported integer data type.

  • depth – Scalar of any supported integer type that specifies number of classes and the size of one-hot dimension.

  • on_value – Scalar of any type that is the value that the locations in output tensor represented by indices in input take.

  • off_value – Scalar of any type that is the value that the locations not represented by indices in input take.

  • name – The optional name for new output node.

Returns

New node performing one-hot operation.