Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #16

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions jax_ppo/lstm/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class _LSTMLayer(linen.Module):
)
@linen.compact
def __call__(self, carry, x):
return linen.OptimizedLSTMCell()(carry, x)
return linen.OptimizedLSTMCell(x.shape[0])(carry, x)


class RecurrentActorCritic(linen.Module):
Expand Down Expand Up @@ -68,7 +68,9 @@ def initialise_carry(

return tuple(
[
linen.OptimizedLSTMCell.initialize_carry(k, batch_dims, hidden_size)
linen.OptimizedLSTMCell(features=hidden_size).initialize_carry(
k, batch_dims + (hidden_size,)
)
for _ in range(n_layers)
]
)
Loading
Loading