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

Add gradient clipping to PPO. #561

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Add gradient clipping to PPO. #561

merged 2 commits into from
Nov 27, 2024

Conversation

kevinzakka
Copy link
Contributor

No description provided.

@@ -241,7 +243,13 @@ def train(
preprocess_observations_fn=normalize)
make_policy = ppo_networks.make_inference_fn(ppo_network)

optimizer = optax.adam(learning_rate=learning_rate)
if max_grad_norm is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a TODO to move gradient clipping to brax/training/gradients.py ?

@btaba btaba self-assigned this Nov 27, 2024
@btaba btaba merged commit 7f9f808 into google:main Nov 27, 2024
3 checks 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