nami.paths.base#

Classes

ProbabilityPath()

Base class for probability paths that interpolate between target and source.

class nami.paths.base.ProbabilityPath[source]#

Bases: object

Base class for probability paths that interpolate between target and source.

Subclasses implement sample_xt to draw noisy interpolants and target_ut to return the conditional velocity target used for flow-matching losses. Stochastic paths (e.g. Brownian bridges) may additionally override score_target to provide the conditional score.

Parameters passed as keyword-only arguments (z, xt) are optional hooks for deterministic sampling and stochastic correction terms respectively. Deterministic paths may safely ignore them.

sample_xt(x_target, x_source, t, *, z=None)[source]#
Return type:

Tensor

Parameters:
score_target(x_target, x_source, t, *, xt)[source]#
Return type:

Tensor

Parameters:
target_ut(x_target, x_source, t, *, xt=None)[source]#
Return type:

Tensor

Parameters: