benchmarks.hota.train_learned.train_step
def train_step(propagator: Propagator, fuser: Fuser, clip: Clip, optimizer: torch.optim.Optimizer, temperature: float = TEMPERATURE) -> floatRun one contrastive multi-frame optimization step on a single clip.
Parameters
| Name | Type | Description |
|---|---|---|
| propagator | Propagator | The learned modules being trained. |
| fuser | Propagator | The learned modules being trained. |
| clip | Clip | A list of frames ``[(embeddings (n_f, D), gt_ids (n_f,)), ...]`` for one clip in frame order. Detection embeddings are L2-normalized internally so training matches inference (where the Fuser emits unit norm and the cosine cost normalizes). |
| optimizer | torch.optim.Optimizer | An optimizer over both modules' parameters. |
| temperature = TEMPERATURE | float | InfoNCE temperature; smaller demands a sharper margin. |
Returns
float — The scalar loss before the gradient step (``0.0`` if the clip has no multi-frame GT track to roll out).
Source: unitrack/benchmarks/hota/train_learned.py:84