ensemble_loss

Contents

ensemble_loss#

hybrid_aif.train.ensemble_loss(members, batch, *, member_weights=None)[source]#

(total, EnsembleLosses): the summed member NLL, plus the per-member vector.

Pure and differentiable in members; each member’s NLL is diag_nll() (the diagonal form, which keeps gradients finite under jit). member_weights is an (M,) weight per member (default ones; a zero removes that member’s gradient); any other shape raises ValueError. The reduction is a sum, which matters where adam is not scale-free (eps and the clip).