openvino.runtime.opset15.multinomial#
- openvino.runtime.opset15.multinomial(probs: Node | int | float | ndarray, num_samples: Node | int | float | ndarray, convert_type: str, with_replacement: bool, log_probs: bool, global_seed: int = 0, op_seed: int = 0, name: str | None = None) 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.
name – The optional new name for output node.
- Returns:
The new node performing Multinomial operation.