-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Add Differentiable Physics: Mass-Spring System example #1332
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for pytorch-examples-preview canceled.
|
@msaroufim I have just updated the example with PR, request you to check if it fits in the "differentiable physics" section |
I don't see any testing changes that were made, you probably want to update this file https://github.com/pytorch/examples/blob/main/run_python_examples.sh I do also think it's worth making some visualization for the work and putting it in the main README |
I have updated the PR.Thanks |
Updated all the changes. |
Summary
This PR adds a simple Differentiable Physics example implementing a Mass-Spring System using PyTorch.
Files Added
examples/differentiable_physics/mass_spring.py
examples/differentiable_physics/README.md
examples/differentiable_physics/requirements.txt
Features
Testing
mass_spring.py
runs successfully in bothtrain
andeval
modes.run_python_examples.sh
for CI testing (5 epochs, 3 steps for quick test).python -m uv
is used for compatibility).Notes
Thank you for reviewing!