Multinomial

Description

Returns the Multinomial sampling result matrix.

Input

One input:

x: tensor of type float16 or float, with shape [batch_size, class_size]. class_size indicates the number of all possible results. Each value represents a non-normalized logarithmic probability of each corresponding result in the batch.

Output

One output:

y: tensor of type int32 or int64. sample_size indicates the number of sampling times. Each value indicates the result of the corresponding sample in the batch.

Attribute

dtype: int. Defaults to 6 (int32).

sample_size: int. Number of sampling times. Defaults to 1.

seed: float, random number seed.

If the call to this operator times out, you need to use the ret = acl.rt.set_op_execute_time_out(timeout) API to prevent the timeout.

ONNX Opset Support

Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18