world_loss

Contents

world_loss#

hybrid_aif.train.world_loss(
core,
batch,
key,
*,
dyn_scale=0.5,
rep_scale=0.1,
free_nats=1.0,
decoder_scale=1.0,
reward_scale=1.0,
cont_scale=1.0,
return_states=False,
)[source]#

The world-model loss on one batch: (total, WorldLosses).

With return_states=True the auxiliary is (WorldLosses, RSSMState), the posterior states of this forward pass, leaves (B, T, ...). Pure and differentiable in core; key draws the straight-through posterior samples. Defaults are DreamerV3’s loss scales and one-nat free-bits floor.