Module: tfp.math

TensorFlow Probability math functions.

Functions

custom_gradient(...): Embeds a custom gradient into a Tensor.

diag_jacobian(...): Computes diagonal of the Jacobian matrix of ys=fn(xs) wrt xs.

log1psquare(...): A numerically stable implementation of log(1 + x**2).

matvecmul(...): Multiply a matrix by a vector.

pinv(...): Compute the Moore-Penrose pseudo-inverse of a matrix.

random_rademacher(...): Generates Tensor consisting of -1 or +1, chosen uniformly at random.

random_rayleigh(...): Generates Tensor of positive reals drawn from a Rayleigh distributions.