diff --git a/RELEASES.md b/RELEASES.md index c7024ad04..47c1f19a0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -50,6 +50,7 @@ This new release adds support for sparse cost matrices and a new lazy EMD solver - Debug Debug linux test core dump (PR #815) - Fix entropic regularization in `gcg`(PR #817, Issue #758) - Fix documentation build on master with submodules (PR #818) +- Fix failing test for unbalanced solver with generic regularization (PR #824) ## 0.9.6.post1 diff --git a/ot/solvers.py b/ot/solvers.py index 88cf5c7ab..b84d4b1d5 100644 --- a/ot/solvers.py +++ b/ot/solvers.py @@ -557,6 +557,11 @@ def solve( isinstance(reg_type, tuple) or reg_type.lower() in ["kl", "l2", "entropy"] ) and unbalanced_type.lower() in ["kl", "l2", "tv"]: + if isinstance(reg_type, tuple) and nx.__name__ == "tf": + raise NotImplementedError( + "Custom regularization is not implemented for TensorFlow backend." + ) + if max_iter is None: max_iter = 1000 if tol is None: