Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time
July 20, 2023 16:17
May 26, 2023 16:32
September 3, 2019 22:41
September 7, 2019 16:56
May 1, 2023 22:03
May 1, 2023 22:01
September 7, 2019 17:05

Deep Declarative Networks


Deep Declarative Networks (DDNs) are a class of deep learning model that allows for optimization problems to be embedded within an end-to-end learnable network. This repository maintains code, tutorials and other resources for developing and understanding DDN models.

You can find more details in this paper (also here), which if you would like to reference in your research please cite as:

  author      = {Stephen Gould and
                 Richard Hartley and
                 Dylan Campbell},
  title       = {Deep Declarative Networks},
  journal     = {IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  year        = {2022},
  month       = {Aug},
  volume      = {44},
  pages       = {3988--4004},
  doi         = {10.1109/TPAMI.2021.3059462}

Running code

When running code from the command line make sure you add the ddn package to your PYTHONPATH. For example:

python tests/

Documentation for the ddn package is provided in the ddn directory and many examples given in the interactive turotials. These should be opened in Jupyter notebook:

cd tutorials
jupyter notebook

or viewed using using's notebook viewer.

Reference (PyTorch) applications for image and point cloud classification can be found under the apps directory. See the README files therein for instructions on installation and how to run.


The ddn library is distributed under the MIT license. See the LICENSE file for details.