MCPcopy Create free account
hub / github.com/AdaptiveMotorControlLab/FMPose3D / euler_sample

Function euler_sample

scripts/FMPose3D_main.py:99–110  ·  view source on GitHub ↗
(x2d, y_local, steps)

Source from the content-addressed store, hash-verified

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 = []

Callers 1

test_multi_hypothesisFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_multi_hypothesisFunction · 0.56