From e5a78c44f5b2f2383b47b71b23ea07ec81b7d5b8 Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 9 Sep 2024 16:22:45 +0200 Subject: [PATCH] hotfix optimal transport flow matching with conditions --- bayesflow/networks/flow_matching/flow_matching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bayesflow/networks/flow_matching/flow_matching.py b/bayesflow/networks/flow_matching/flow_matching.py index b9373cbe..d1d14a5c 100644 --- a/bayesflow/networks/flow_matching/flow_matching.py +++ b/bayesflow/networks/flow_matching/flow_matching.py @@ -101,7 +101,7 @@ def compute_metrics( # use weak regularization and low number of steps for efficiency if self.use_optimal_transport: - x0, x1 = optimal_transport(x0, x1, seed=self.seed_generator, **self.optimal_transport_kwargs) + x1, x0 = optimal_transport(x1, x0, seed=self.seed_generator, **self.optimal_transport_kwargs) t = keras.random.uniform((keras.ops.shape(x0)[0],), seed=self.seed_generator) t = expand_right_as(t, x0)