google / google/brax

While loop in generalized/math forces to use grads Forward mode

Open
#290 1 comment 0 reactions 1 assignee Claimed by @erikfrey View on GitHub
Dominant language
Jupyter Notebook
Stars
3.2k
Forks
349
PR merge metrics
No merged PRs in 30d

Description

https://github.com/google/brax/blob/280a1c50fa021b6c17a2a3347fea43a2887382bc/brax/v2/math.py#L278

For people who want to calculate gradients over environment steps, this while loop is a bit annoying ;). Forward mode works fine for me now. But I just wanted to point out that maybe the speed optimization is negligible compared to having the possibility for reverse mode gradients?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.