(samples_source, samples_target)
| 193 | |
| 194 | |
| 195 | def 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 | |
| 207 | time_naive_gw, avg_value_naive_gw = benchmark_naive_gw(samples_source, samples_target) |
no test coverage detected