pantheonrl.algos.adap.util
Collection of helper functions for ADAP
Functions
Samples from categorical distribution |
|
Gets the KL loss for ADAP |
|
Samples from l2 sphere |
|
Returns context vector of shape (num,1) with numbers in range [0, ctx_size] |
|
Samples from the square with axes between 0 and 1 |
|
Samples from unit square centered at 0 |
|
Wrapper for the PyTorch implementation of the full form KL Divergence :param dist_true: the p distribution :param dist_pred: the q distribution :return: KL(dist_true||dist_pred) |