Skip to content
fn

dreamer

→DreamerModel
dreamer(pretrained: bool = False, overrides: object = {})

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

PlaNet's architecture unchanged — a four-layer stride-2 convolutional encoder, a recurrent state-space model with a 200-unit deterministic path and a 30-unit stochastic state, a mirrored decoder — plus the two heads that replace PlaNet's planner: a tanh-squashed Gaussian actor and a scalar critic, each three 300-unit ELU layers.

Model Size

Parameters

pretrainedbool= False
No weights are published for this family; passing True raises rather than returning a randomly initialised model.
**overridesobject= {}
Optional DreamerConfig field overrides. action_dim is the one you almost always need — it is set by the environment, not by the paper.

Returns

DreamerModel

The trunk, configured with the paper defaults and any overrides.

Notes

Reference: Hafner, Lillicrap, Ba, and Norouzi, "Dream to Control: Learning Behaviors by Latent Imagination", ICLR, 2020 (arXiv:1912.01603).

Examples

>>> from lucid.models.generative.dreamer import dreamer
>>> model = dreamer(action_dim=6).eval()
>>> model.config.horizon, model.config.lambda_
(15, 0.95)

Used by 1