Decay ancillary deep supervision loss weights during luz training.
Arguments
- weight_env
A weight environment created by
make_ds_weightsand shared withds_loss.- decay
Character string, either
"linear"(default) or"cosine".- primary_only_frac
Numeric value in
(0, 1)specifying the fraction of total epochs at the end of training during which only the primary loss is used (ancillary weights are zero). Defaults to0.1.
Details
A luz callback that reduces the weights of ancillary outputs (all elements
of weight_env$values except the first) toward zero over the decaying
portion of training, leaving the primary output weight unchanged. The
fraction of epochs reserved for primary-loss-only training is controlled by
primary_only_frac (default 0.1, i.e. the final 10\
epochs).
Two decay schedules are supported:
"linear"Ancillary weights decrease linearly from their initial values to zero. Matches the nnU-Net strategy.
"cosine"Ancillary weights follow a cosine curve, decaying slowly at first and more rapidly through mid-training.
