start storing the experience lens
This commit is contained in:
parent
3d5617d769
commit
4d8f5613cc
@ -82,6 +82,7 @@ class Experience:
|
|||||||
log_probs: tuple[Tensor, Tensor] | None = None
|
log_probs: tuple[Tensor, Tensor] | None = None
|
||||||
values: Tensor | None = None
|
values: Tensor | None = None
|
||||||
step_size: int | None = None
|
step_size: int | None = None
|
||||||
|
lens: Tensor | None = None,
|
||||||
agent_index: int = 0
|
agent_index: int = 0
|
||||||
is_from_world_model: bool = True
|
is_from_world_model: bool = True
|
||||||
|
|
||||||
@ -2560,12 +2561,16 @@ class DynamicsWorldModel(Module):
|
|||||||
|
|
||||||
# returning agent actions, rewards, and log probs + values for policy optimization
|
# returning agent actions, rewards, and log probs + values for policy optimization
|
||||||
|
|
||||||
|
batch, device = latents.shape[0], latents.device
|
||||||
|
experience_lens = torch.full((batch,), time_steps, device = device)
|
||||||
|
|
||||||
gen = Experience(
|
gen = Experience(
|
||||||
latents = latents,
|
latents = latents,
|
||||||
video = video,
|
video = video,
|
||||||
proprio = proprio if has_proprio else None,
|
proprio = proprio if has_proprio else None,
|
||||||
step_size = step_size,
|
step_size = step_size,
|
||||||
agent_index = agent_index,
|
agent_index = agent_index,
|
||||||
|
lens = experience_lens,
|
||||||
is_from_world_model = True
|
is_from_world_model = True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "dreamer4"
|
name = "dreamer4"
|
||||||
version = "0.0.72"
|
version = "0.0.73"
|
||||||
description = "Dreamer 4"
|
description = "Dreamer 4"
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Phil Wang", email = "lucidrains@gmail.com" }
|
{ name = "Phil Wang", email = "lucidrains@gmail.com" }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user