• turneram's avatar
    Add multinomial op (#954) · 0b7672d7
    turneram authored
    
    
    Add multinomial op to onnx parser with ref and GPU implementations.
    
    The onnx parser inserts a literal of shape {batch_size, sample_size} with random values in the range [0, 1) and inserts existing ops to compute the cumulative density function. The multinomial operator multiplies the random values by the sum of the CDF and returns the index of the first element of the CDF that is greater than the result, representing samples randomly drawn from [0, class_size) that follow the log-probability distribution.
    
    Resolves #821
    Co-authored-by: default avatarShucai Xiao <shucai@gmail.com>
    0b7672d7
ref_ops_test.cpp 196 KB