Comments (5)
@LaetitiaPapaxanthos here you can also observe the performance of unbalanced with
As I show the problem is indeed in gw_unbalanced_correction=True
(with False
it works).
you can obviously play there with everything :)
from ott.
For the tau_a = tau_b = 0.9
, I noticed that the total mass transported is very low (1e-5), whereas if only 1 is unbalanced, it's fairly high (0.9). Code to reproduce:
from jax.config import config
config.update("jax_enable_x64", True)
import ott
import jax
import numpy as np
from ott.geometry.pointcloud import PointCloud
np.random.seed(0)
x = np.random.normal(size=(64, 3))
y = np.random.normal(size=(128, 3))
xx = np.random.normal(size=(64, 3))
yy = np.random.normal(size=(128, 3))
o, scale_cost = True, 'max_cost'
geom_x = PointCloud(x, online=o, scale_cost=scale_cost)
geom_y = PointCloud(y, online=o, scale_cost=scale_cost)
geom_xy = PointCloud(xx, yy, online=o, scale_cost=scale_cost)
solver = ott.core.gromov_wasserstein.GromovWasserstein(jit=False, epsilon=1e-2, lse_mode=False)
prob = ott.core.quad_problems.QuadraticProblem(geom_x, geom_y,
geom_xy,
tau_a=0.8, tau_b=0.8,
gw_unbalanced_correction=True)
iteration = 0
state = solver.init_state(prob, -1)
linear_pb = prob.update_linearization(state.linear_state, solver.epsilon, state.old_transport_mass)
out = solver.linear_ot_solver(linear_pb)
old_transport_mass = jax.lax.stop_gradient(
state.linear_state.transport_mass()
)
state = state.update(
iteration, out, linear_pb, solver.store_inner_errors, old_transport_mass
)
print(state.linear_state.marginal(0).sum()) # 1.883714535238546e-05
from ott.
In the next iteration, the solution to the linearized problems contains infs
; this also causes the transport mass sum to be 0
(and makes the scale between the old and the new transport mass NaN
). This only happens when gw_unbalanced_correction=True
.
from ott.
maybe we can close now?
from ott.
completed via #128
from ott.
Related Issues (20)
- `implicit` parameter not used in the Sinkhorn Divergence Hessians notebook? HOT 1
- Don't ignore params in potentials
- Remove sparse option in the `Graph` geometry
- Add sharp bits-like page
- Sinkhorn slower on GPU than CPU HOT 2
- Enable `nitpicky` mode for documentation HOT 1
- `relative_epsilon` for entropic Gromov-Wasserstein solver
- Remove old test code
- Test improvements
- Not passing `epsilon` with kernel matrix causes recursion error HOT 1
- GPU Memory consumption HOT 5
- Bug in Sinkhorn Barycenter notebook HOT 1
- Add unbalanced LR Sinkhorn
- Parallelization when `lse_mode=False` HOT 6
- converged flag in `SinkhornOutput` is not reliable.
- Create different repo for notebooks
- Make contributor guide visible
- JAX Concretization error when jitting sinkhorn with non-static tau_a, tau_b HOT 3
- ott.tools.soft_sort.ranks doc mismatch with function signature HOT 2
- have a `solve()` method for `sinkhorn_lr`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ott.