Skip to content
fn

dreamer_v2

→DreamerV2Model
dreamer_v2(pretrained: bool = False, overrides: object = {})

Construct DreamerV2's world model, actor and critic — no objectives.

Dreamer's architecture with a categorical latent: 32 variables of 32 classes, sampled as one-hots and carried as a 1024-wide sparse binary vector. Four-layer 400-unit ELU heads for reward, value and policy, plus a frozen copy of the critic to compute returns against.

Model Size

Parameters

pretrainedbool= False
No weights are published for this family; passing True raises.
**overridesobject= {}
Optional DreamerV2Config field overrides. action_dim is set by the environment, not by the paper.

Returns

DreamerV2Model

The trunk, configured with the released defaults.

Notes

Reference: Hafner, Lillicrap, Norouzi, and Ba, "Mastering Atari with Discrete World Models", ICLR, 2021 (arXiv:2010.02193).

Examples

>>> from lucid.models import dreamer_v2
>>> model = dreamer_v2(action_dim=6).eval()
>>> model.config.stoch_size, model.config.discrete
(32, 32)

Used by 1