Skip to content

Commit 1350c72

Browse files
authored
[FIX] Remove tf backend for generic regularizer in unbalanced (#824)
* remove tf generig reg * add info to reelase file
1 parent 44fd091 commit 1350c72

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

RELEASES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ This new release adds support for sparse cost matrices and a new lazy EMD solver
5050
- Debug Debug linux test core dump (PR #815)
5151
- Fix entropic regularization in `gcg`(PR #817, Issue #758)
5252
- Fix documentation build on master with submodules (PR #818)
53+
- Fix failing test for unbalanced solver with generic regularization (PR #824)
5354

5455
## 0.9.6.post1
5556

ot/solvers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,11 @@ def solve(
557557
isinstance(reg_type, tuple)
558558
or reg_type.lower() in ["kl", "l2", "entropy"]
559559
) and unbalanced_type.lower() in ["kl", "l2", "tv"]:
560+
if isinstance(reg_type, tuple) and nx.__name__ == "tf":
561+
raise NotImplementedError(
562+
"Custom regularization is not implemented for TensorFlow backend."
563+
)
564+
560565
if max_iter is None:
561566
max_iter = 1000
562567
if tol is None:

0 commit comments

Comments
 (0)