Define the linear interpolant from noise at t=0 to data at t=1, the constant target velocity along that path, and the seeded time and noise samplers that generate training trajectories.
Assemble a flow-matching minibatch of interpolated states, times, and target velocities, then score a predicted velocity field with mean squared error.
Embed scalar times as sinusoidal Fourier features and implement a two-hidden-layer velocity network as a seeded parameter dict with a functional forward pass.
Build a fixed-seed 2-D Gaussian mixture and train the velocity MLP with manual SGD on the flow-matching loss.
Integrate the learned velocity ODE from noise at t=0 to data at t=1 using evenly spaced timesteps and both Euler and Heun predictor-corrector steps.
Score generated samples by nearest-neighbor MSE, construct rectified (noise, generated-data) pairs, and run the capstone train-and-sample experiment against a pure-noise baseline.