(x2d, y_local, steps)
| 97 | |
| 98 | # Simple Euler sampler for CFM at test time |
| 99 | def euler_sample(x2d, y_local, steps): |
| 100 | dt = 1.0 / steps |
| 101 | for s in range(steps): |
| 102 | t_s = torch.full( |
| 103 | (gt_3D.size(0), 1, 1, 1), |
| 104 | s * dt, |
| 105 | device=gt_3D.device, |
| 106 | dtype=gt_3D.dtype, |
| 107 | ) |
| 108 | v_s = model_3d(x2d, y_local, t_s) |
| 109 | y_local = y_local + dt * v_s |
| 110 | return y_local |
| 111 | |
| 112 | for s_keep in eval_steps: |
| 113 | list_hypothesis = [] |
no outgoing calls