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

Purpose of split_and_pad_trajectories() and unpad_trajectories() for recurrent neural network #41

Open
dxyy1 opened this issue Sep 27, 2024 · 0 comments

Comments

@dxyy1
Copy link

dxyy1 commented Sep 27, 2024

Hi there,

Apologies if this question seems obvious but I wonder if and why the two functions split_and_pad_trajectories() and unpad_trajectories() are necessary, if rollout_storage already stores the Memory class' hidden states?

My understanding is that because the RNNs process the observation sequentially step after step, you'd want to split and pad the observations at every done so you don't pass in the a newly reset environment observation with the hidden states from last time step. But I wonder if this issue is already avoided since RolloutStorage class stores the previous timestep's hidden states along with the current timestep's observation, i.e.

hidden states observation actions ...
$$\text{hiddenStates}_{t-1}$$ $$obs_t$$ $$a_t$$ ...
... ... ... ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant