Training

Training#

train_basis() trains one basis on one target and mirrors the upstream loop. train_basis_batched() adds several images, epochs, a cosine learning-rate schedule, validation and early stopping.

Training pipelines.

Two trainers:

  • train_basis — single-target loop (Phase 1, upstream parity).

  • train_basis_batched — multi-image / multi-epoch with cosine LR schedule, validation + early stopping, JIT’d Adam fast path.

Contents

train_basis

Train basis to minimize loss(basis.tensors, target) over steps.

train_basis_batched

Multi-image, multi-epoch trainer with cosine LR schedule.

TrainingResult

cosine_with_warmup

Linear warmup followed by cosine decay.