ott.neural.methods.flow_matching.evaluate_velocity_field#
- ott.neural.methods.flow_matching.evaluate_velocity_field(model, x, cond=None, *, t0=0.0, t1=1.0, reverse=False, num_steps=None, solver=None, save_trajectory_kwargs=None, save_velocity_kwargs=None, **kwargs)[source]#
Solve an ODE.
- Parameters:
model (
Module) – Velocity field with a signature(t, x_t, cond) -> v_t.t0 (
float) – Start time of the integration.t1 (
float) – End time of the integration.reverse (
bool) – Whether to integrate from \(t_1\) to \(t_0\).num_steps (
Optional[int]) – Number of steps used for solvers with a constant step size.solver (
Optional[AbstractSolver]) – ODE solver. IfNoneandstep_size = None, useDopri5. Otherwise useEuler.save_velocity_kwargs (
Optional[Dict[str,Any]]) – Keyword arguments forSubSaveAtused to store the velocities along the integration path. The velocity will be saved inout.ys['v_t'].save_trajectory_kwargs (
Optional[Dict[str,Any]]) – Keyword arguments forSubSaveAtused to store the positions along the integration path. The trajectory will be saved inout.ys['x_t'].kwargs (
Any) – Keyword arguments fordiffeqsolve().
- Return type:
- Returns:
The ODE solution.