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

[Question] Not updating lstm states during training #265

Open
4 tasks done
abhinavj98 opened this issue Nov 21, 2024 · 1 comment
Open
4 tasks done

[Question] Not updating lstm states during training #265

abhinavj98 opened this issue Nov 21, 2024 · 1 comment
Labels
question Further information is requested

Comments

@abhinavj98
Copy link

❓ Question

In training PPO-Recurrent over different epochs we do not update the LSTM states even though the LSTM weights get updated. Is there a reason to do so? Or is it just to save compute and does not effect the optimization process a lot?

https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/blob/master/sb3_contrib/ppo_recurrent/ppo_recurrent.py#L345-L349

Checklist

@abhinavj98 abhinavj98 added the question Further information is requested label Nov 21, 2024
@araffin
Copy link
Member

araffin commented Nov 27, 2024

Is there a reason to do so?

Simplicity.

Or is it just to save compute and does not effect the optimization process a lot?

yes.

They are mostly used to get a better initialization of the hidden state of the LSTM.
(and also, the updated LSTM should not be too far in parameter space to the old LSTM used to collect the data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants