data
TVMOutput
extends
ModelOutputTVMOutput(loss: Tensor, terminal_loss: Tensor, flow_matching_loss: Tensor)What a TVM training step reports.
Attributes
lossTensorThe objective of Eq. 15, a scalar — the two terms below, summed
per sample and averaged over the batch.
terminal_ lossTensorThe batch mean of the terminal-velocity term, .
Zero for samples drawn with .
flow_ matching_ lossTensorThe batch mean of the guided Flow Matching term. Reported apart
because the two move differently: Flow Matching settles early
while the terminal term keeps falling, and a terminal term that
stalls while Flow Matching is fine is the first sign of a bad
target EMA.
Examples
>>> import lucid
>>> from lucid.models.generative.tvm._model import TVMOutput
>>> out = TVMOutput(
... loss=lucid.zeros(()),
... terminal_loss=lucid.zeros(()),
... flow_matching_loss=lucid.zeros(()),
... )
>>> out.loss.shape
()