Module: tfp.experimental.substrates.jax.math.generic

View source on GitHub

Functions for generic calculations.

Functions

log_add_exp(...): Computes log(exp(x) + exp(y)) in a numerically stable way.

log_combinations(...): Multinomial coefficient.

reduce_logmeanexp(...): Computes log(mean(exp(input_tensor))).

reduce_weighted_logsumexp(...): Computes log(abs(sum(weight * exp(elements across tensor dimensions)))).

soft_threshold(...): Soft Thresholding operator.

softplus_inverse(...): Computes the inverse softplus, i.e., x = softplus_inverse(softplus(x)).