Skip to content

Commit

Permalink
fix NaNs in dt for zero-length intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilykuleshov committed Oct 1, 2024
1 parent 282bb99 commit aaf70ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchode/step_size_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def _select_initial_step(
args,
)

d2 = norm((f1 - f0) * inv_scale) / dt0
d2 = torch.where(dt0 == 0, torch.inf, norm((f1 - f0) * inv_scale) / dt0)

maxd1d2 = torch.maximum(d1, d2)
dt1 = torch.where(
Expand Down

0 comments on commit aaf70ea

Please sign in to comment.