(self, x, t, t_next, r1=1 / 2, eps_cache=None)
| 368 | return x_1, eps_cache |
| 369 | |
| 370 | def dpm_solver_2_step(self, x, t, t_next, r1=1 / 2, eps_cache=None): |
| 371 | eps_cache = {} if eps_cache is None else eps_cache |
| 372 | h = t_next - t |
| 373 | eps, eps_cache = self.eps(eps_cache, 'eps', x, t) |
| 374 | s1 = t + r1 * h |
| 375 | u1 = x - self.sigma(s1) * (r1 * h).expm1() * eps |
| 376 | eps_r1, eps_cache = self.eps(eps_cache, 'eps_r1', u1, s1) |
| 377 | x_2 = x - self.sigma(t_next) * h.expm1() * eps - self.sigma(t_next) / (2 * r1) * h.expm1() * (eps_r1 - eps) |
| 378 | return x_2, eps_cache |
| 379 | |
| 380 | def dpm_solver_3_step(self, x, t, t_next, r1=1 / 3, r2=2 / 3, eps_cache=None): |
| 381 | eps_cache = {} if eps_cache is None else eps_cache |
no test coverage detected