google / google/brax

Differentiation wrt system parameters

Open
#19 6 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Jupyter Notebook
Stars
3.2k
Forks
349
PR merge metrics
No merged PRs in 30d

Description

Hey,

I can see how brax can be used to differentiate with respect to the system state. I wonder if there is a nice way to also diff wrt, e.g., the mass of a body. Taking the basic tutorial as an example, I would like to have something like `step(sys, ..., ball_mass=10.)` which is a pure jax function.

I have found `brax.physics.bodies.Body`, which could be adapted via a `.replace()` call. However, I don't see how I can a) find it starting out with a `System` instance and b) how I could update that instance with a replaced version without potentially breaking things.

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.