dreamer_v2_world_model(pretrained: bool = False, overrides: object = {})Construct DreamerV2 with all three of its objectives.
Same trunk as dreamer_v2, wrapped with the world-model bound
under a balanced divergence, an actor maximising imagined
with an entropy bonus, and a critic regressing onto
a target copy of itself.
Model Size
Parameters
pretrainedbool= FalseNo weights are published for this family; passing
True raises.**overridesobject= {}Optional
DreamerV2Config field overrides. kl_balance
and actor_grad are the two that change the algorithm rather
than its size.Returns
DreamerV2ForWorldModelingThe trunk plus the objectives.
Notes
Reference: Hafner, Lillicrap, Norouzi, and Ba, "Mastering Atari with Discrete World Models", ICLR, 2021 (arXiv:2010.02193).
The three losses take three separate optimisers; use
lucid.models.DreamerV2ForWorldModeling.backward to fill their
gradients, and call update_slow_target once per step.
Examples
>>> from lucid.models import dreamer_v2_world_model
>>> model = dreamer_v2_world_model(action_dim=6).eval()
>>> model.config.kl_balance, model.config.resolved_actor_grad
(0.8, 'dynamics')