Skip to content

facebookresearch/theseus

Repository files navigation

CircleCI License python 3.7, 3.8 pre-commit Code style: black

Theseus

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.

Getting Started

  • 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.
  • Installing

    git clone https://github.com/facebookresearch/theseus.git && cd theseus
    pip install -e .
  • Running unit tests

    pytest theseus

    By default both cuda and non-cuda tests are run, add the option -m "not cuda" to skip cuda tests when installing without cuda support.

  • See tutorials and examples to learn about the API and usage.

Additional Information

  • 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.

License

Theseus is MIT licensed. See the LICENSE for details.