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

Fix: with SAC, a new training batch should be sampled for each gradient step #208

Merged
merged 2 commits into from
Nov 3, 2024

Conversation

YiboDi
Copy link

@YiboDi YiboDi commented Oct 8, 2024

…nt_step.

DDPG/TD3/SAC for robotics tasks #65
Increasing the number of parallel simulations accelerates the replay buffer data refresh rate in SAC and other off-policy algorithms. However, to fully leverage this increased data collection, the model should be updated more frequently. This can be achieved by increasing self._gradient_steps.

Issue:

- Current Behavior: The current implementation reuses the same training batch across multiple gradient steps, which can lead to overfitting and inefficient use of the new data collected from parallel simulations.

- Expected Behavior: According to the SAC algorithm implementation, a new training batch should be sampled for each gradient step to ensure diverse and fresh experiences are used for updates.

Fixed Implemented:

  • Modified the SAC training loop to sample a new training batch from the replay buffer for each gradient step.

@Toni-SM Toni-SM changed the base branch from main to develop November 2, 2024 19:11
@Toni-SM Toni-SM changed the title Fix: with SAC, a new training batch should be sampled for each gradie… Fix: with SAC, a new training batch should be sampled for each gradient step Nov 2, 2024
@Toni-SM Toni-SM merged commit 5fce807 into Toni-SM:develop Nov 3, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants