WorldLosses#

class hybrid_aif.train.WorldLosses[source]#

Bases: NamedTuple

The objective, decomposed: every field a scalar mean over batch and time.

dyn > dyn_raw means the free-bits floor binds.

total: Array#

The differentiated loss (scales applied).

decoder: Array#

The decoder’s unscaled negative log-likelihood.

reward: Array#

The reward head’s unscaled negative log-likelihood.

cont: Array#

The continuation head’s unscaled negative log-likelihood.

dyn: Array#

The dynamics KL KL[sg(posterior) || prior], after the free-bits floor and before its scale.

rep: Array#

The representation KL KL[posterior || sg(prior)], after the free-bits floor and before its scale.

dyn_raw: Array#

The dynamics KL before the floor.

rep_raw: Array#

The representation KL before the floor.

static __new__(_cls, total, decoder, reward, cont, dyn, rep, dyn_raw, rep_raw)#

Create new instance of WorldLosses(total, decoder, reward, cont, dyn, rep, dyn_raw, rep_raw)