data
DreamerV3Output
extends
ModelOutputDreamerV3Output(observation: Tensor, reward: Tensor, value: Tensor, posterior_stoch: Tensor, posterior_logits: Tensor, prior_logits: Tensor, deter: Tensor, loss: Tensor | None = None, recon_loss: Tensor | None = None, reward_loss: Tensor | None = None, dynamics_loss: Tensor | None = None, representation_loss: Tensor | None = None, kl_loss: Tensor | None = None, pcont_loss: Tensor | None = None, behavior: DreamerV3BehaviorOutput | None = None)What DreamerV3Model returns after filtering a trajectory.
Attributes
observationTensorReconstruction,
(B, T, C, 64, 64).reward, valueTensorPredictions at each posterior state,
(B, T), decoded from
their bin distributions and back in the target's own units.posterior_stochTensorThe filtered latent, flattened,
(B, T, stoch_size * discrete).posterior_logits, prior_logitsTensorClass scores before and after seeing the frame,
(B, T, stoch_size, discrete).deterTensorThe deterministic path,
(B, T, D).loss, recon_loss, reward_loss, pcont_lossTensor or NoneWorld-model terms, set only by
DreamerV3ForWorldModeling.dynamics_loss, representation_lossTensor or NoneThe two halves of the divergence, already scaled and floored.
Kept apart because their ratio is what a reader checks when a
latent collapses.
kl_lossTensor or NoneTheir sum, for symmetry with the earlier families.
behaviorDreamerV3BehaviorOutput or NoneActor and critic terms, set only by that wrapper.
Examples
>>> import lucid
>>> from lucid.models import dreamer_v3_12m
>>> model = dreamer_v3_12m(action_dim=2, cnn_depth=2, stoch_size=3, discrete=4,
... deter_size=8, hidden_size=8, actor_hidden=8, value_hidden=8,
... reward_hidden=8, num_bins=5)
>>> out = model(lucid.randn((1, 2, 3, 64, 64)), lucid.randn((1, 2, 2)))
>>> out.posterior_stoch.shape, out.posterior_logits.shape
((1, 2, 12), (1, 2, 3, 4))Used by 1
Constructors
1dunder
__init__
→None__init__(observation: Tensor, reward: Tensor, value: Tensor, posterior_stoch: Tensor, posterior_logits: Tensor, prior_logits: Tensor, deter: Tensor, loss: Tensor | None = None, recon_loss: Tensor | None = None, reward_loss: Tensor | None = None, dynamics_loss: Tensor | None = None, representation_loss: Tensor | None = None, kl_loss: Tensor | None = None, pcont_loss: Tensor | None = None, behavior: DreamerV3BehaviorOutput | None = None)