- class ott.solvers.linear.implicit_differentiation.ImplicitDiff(solver_fun=<function cg>, ridge_kernel=0.0, ridge_identity=0.0, symmetric=False, precondition_fun=None)[source]#
Implicit differentiation of Sinkhorn algorithm.
...]]) – Callable, should return (solution, …)
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.
Array]]) – TODO(marcocuturi)
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.
- param kwargs:
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.