- class ott.solvers.linear.implicit_differentiation.ImplicitDiff(solver_fun=<function cg>, ridge_kernel=0.0, ridge_identity=0.0, symmetric=False, precondition_fun=None)#
Implicit differentiation of Sinkhorn algorithm.
float) – promotes zero-sum solutions. only used if tau_a = tau_b = 1.0
float) – handles rank deficient transport matrices (this happens typically when rows/cols in cost/kernel matrices are collinear, or, equivalently when two points from either measure are close).
bool) – flag used to figure out whether the linear system solved in the implicit function theorem is symmetric or not. This happens when either
a == bor the precondition_fun is the identity. False by default, and, at the moment, needs to be set manually by the user in the more favorable case where the system is guaranteed to be symmetric.
- Return type
first_order_conditions(prob, f, g, lse_mode)
Compute vector of first order conditions for the reg-OT problem.
gradient(prob, f, g, lse_mode, gr)
Apply vjp to recover gradient in reverse mode differentiation.
solve(gr, ot_prob, f, g, lse_mode)
Apply minus inverse of [hessian
solver_fun(b[, x0, tol, atol, maxiter, M])
Use Conjugate Gradient iteration to solve
Ax = b.