A library for differentiable nonlinear optimization built on PyTorch to support constructing various problems in robotics and vision as end-to-end differentiable architectures.
The current focus is on nonlinear least squares with support for sparsity, batching, GPU, and backward modes for unrolling, truncated and implicit, and sampling based differentiation. This library is in beta with expected full release in mid 2022.
-
Prerequisites
- We strongly recommend you install
theseus
in a venv or conda environment. - Theseus requires
torch
installation. To install for your particular CPU/CUDA configuration, follow the instructions in the PyTorch website. - Theseus also requires
suitesparse
, which you can install via:sudo apt-get install libsuitesparse-dev
(Ubuntu).conda install -c conda-forge suitesparse
(Mac).
- We strongly recommend you install
-
Installing
git clone https://github.com/facebookresearch/theseus.git && cd theseus pip install -e .
-
Running unit tests
pytest theseus
By default, unit tests include tests for our CUDA extensions. You can add the option
-m "not cudaext"
to skip them when installing without CUDA support. -
See tutorials and examples to learn about the API and usage.
- Use Github issues for questions, suggestions, and bugs.
- See CONTRIBUTING if interested in helping out.
- Theseus is being developed with the help of many contributors, see THANKS.
Theseus is MIT licensed. See the LICENSE for details.