MCPcopy Create free account
hub / github.com/PythonOT/POT / benchmark_batch_gw

Function benchmark_batch_gw

examples/backends/plot_ot_batch.py:195–204  ·  view source on GitHub ↗
(samples_source, samples_target)

Source from the content-addressed store, hash-verified

193
194
195def benchmark_batch_gw(samples_source, samples_target):
196 start = perf_counter()
197 C1_batch = ot.dist_batch(samples_source, samples_source)
198 C2_batch = ot.dist_batch(samples_target, samples_target)
199 res_batch = solve_gromov_batch(
200 C1_batch, C2_batch, reg=1, max_iter=100, max_iter_inner=50, tol=tol
201 )
202 avg_value = np.mean(res_batch.value)
203 end = perf_counter()
204 return end - start, avg_value
205
206
207time_naive_gw, avg_value_naive_gw = benchmark_naive_gw(samples_source, samples_target)

Callers 1

plot_ot_batch.pyFile · 0.85

Calls 2

solve_gromov_batchFunction · 0.90
meanMethod · 0.45

Tested by

no test coverage detected