Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings


View source on GitHub

Returns w such that inverse(a + u.T.dot(u)) = a_inv + w.

    a_inv, u

Makes use of the Woodbury matrix identity. See https://en.wikipedia.org/wiki/Woodbury_matrix_identity

NOTE: This implementation assumes that a_inv is symmetric. Since it's too expensive to check symmetricity, the function silently outputs a wrong answer in case a is not symmetric.


  • a_inv: an invertible SYMMETRIC Tensor of shape [m, m].
  • u: a Tensor of shape [n, m].


A Tensor w of shape [m, m] such that inverse(a + u.T.dot(u)) = a_inv + w.


  • ValueError: if a_inv is not square or a_inv and u have incompatible shapes.