tf_agents.bandits.policies.linalg.update_inverse

Updates the inverse using the Woodbury matrix identity.

Given a matrix A of size d-by-d and a matrix X of size k-by-d, this function computes the inverse of B = A + X^T X, assuming that the inverse of A is available.

Reference:

https://en.wikipedia.org/wiki/Woodbury_matrix_identity

a_inv a Tensor of shape [d, d]. This is the current inverse of A.
x a Tensor of shape [k, d].

The update that needs to be added to 'a_inv' to compute the inverse. If x is empty, a zero matrix is returned.