Skip to content

Commit 0cc7a79

Browse files
committed
cleanup
1 parent df57ea3 commit 0cc7a79

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

improving_transformers_world_model/agent.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,9 @@ def calc_target_and_gae(
101101
delta = rewards + gamma * values_next * masks - values
102102
gates = gamma * lam * masks
103103

104-
gates, delta = gates[..., :, None], delta[..., :, None]
105-
106104
scan = AssocScan(reverse = True, use_accelerated = use_accelerated)
107105
gae = scan(gates, delta)
108106

109-
gae = gae[..., :, 0]
110-
111107
returns = gae + values
112108

113109
gae, returns = tuple(inverse_pack(t) for t in (gae, returns))

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "improving-transformers-world-model"
3-
version = "0.0.52"
3+
version = "0.0.53"
44
description = "Improving Transformers World Model for RL"
55
authors = [
66
{ name = "Phil Wang", email = "lucidrains@gmail.com" }
@@ -26,7 +26,7 @@ classifiers=[
2626

2727
dependencies = [
2828
"adam-atan2-pytorch>=0.1.18",
29-
"assoc-scan",
29+
"assoc-scan>=0.0.2",
3030
"einx>=0.3.0",
3131
"einops>=0.8.0",
3232
"ema-pytorch>=0.7.7",

0 commit comments

Comments
 (0)