Skip to content

Commit 747fe5e

Browse files
committed
change default integration method to rk45
for DiffusionModel and FlowMatching. Euler shows significant deviations when computing the log-prob, which risks misleading users regarding the performance of the networks. rk45 is slower, but the problem is heavily reduced with this method.
1 parent cd2d093 commit 747fe5e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bayesflow/networks/diffusion_model/diffusion_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class DiffusionModel(InferenceNetwork):
4444
}
4545

4646
INTEGRATE_DEFAULT_CONFIG = {
47-
"method": "euler",
47+
"method": "rk45",
4848
"steps": 100,
4949
}
5050

bayesflow/networks/flow_matching/flow_matching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class FlowMatching(InferenceNetwork):
5353
}
5454

5555
INTEGRATE_DEFAULT_CONFIG = {
56-
"method": "euler",
56+
"method": "rk45",
5757
"steps": 100,
5858
}
5959

0 commit comments

Comments
 (0)