openvino.runtime.opset14.multinomial

openvino.runtime.opset14.multinomial(probs: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], num_samples: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], convert_type: str, with_replacement: bool, log_probs: bool, global_seed: int = 0, op_seed: int = 0) openvino._pyopenvino.Node

Return a node which generates a sequence of class indices sampled from the multinomial distribution.

Parameters
  • probs – Tensor with probabilities of floating-point type, and shape [batch_size, class_size].

  • num_samples – Tensor (scalar or 1D) a single element of type i32 or i64, specifying the number of samples to draw from the multinomial distribution.

  • convert_type – Specifies the output tensor type, possible values: ‘i64’, ‘i32’.

  • with_replacement – Flag that specifies whether to sample with replacement.

  • log_probs – Flag that specifies whether probs should be treated as unnormalized log probabilities.

  • global_seed – Specifies global seed value. Required to be a positive integer or 0.

  • op_seed – Specifies operational seed value. Required to be a positive integer or 0.

Returns

The new node performing Multinomial operation.