Multinomial
Description
Draws numSamples samples from the input x based on the probability distribution of each object, and stores the indices of these samples in the output y.
Input
x: input tensor of type float16 or float, with a shape of [batch_size, class_size]. class_size indicates the number of all possible results. Each value indicates the non-normalized logarithm probability of each result in the batch.
Attribute
- dtype: int, indicating the data type of the output. The default value is 6.
- sample_size: int, indicating the number of sampling times. The default value is 1.
- seed: float, indicating a random number seed.
Output
y: output tensor of type int32 or int64, with a shape of [batch_size, sample_size]. sample_size indicates the number of sampling times. Each value indicates the result of the corresponding sample in the batch.
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.
Constraints
None.
ONNX Opset Support
Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18.