LFADSEvalTrainer#
- class ts2.models.single_session.LFADSEvalTrainer(cfg, rank, world_size)[source]#
Bases:
ts2.ts2_eval_trainer.TS2EvalTrainerTS2 trainer for LFADS.
Replaces the base reconstruction loss with the LFADS ELBO:
- L = recon + l2_ramp * (l2_gen_scale * l2_gen + l2_con_scale * l2_con)
kl_ramp * (kl_ic_scale * kl_ic + kl_co_scale * kl_co)
All three groups are per-sample sums averaged over the batch, which makes the KL scales true ELBO weights (1.0 is the unmodified ELBO). Weighting a per-element mean reconstruction against per-sample summed KL terms is what produces posterior collapse.