Practical overview
When it fits
Use OptNet when investigating whether an explicit quadratic-program optimization step can be learned as part of a PyTorch model, or when examining the repository's research experiments.
Who it is for
- Machine-learning researchers exploring optimization layers in neural networks.
- PyTorch developers studying or adapting the repository's denoising, Sudoku or classification experiments.
Documented uses
- Incorporate differentiable quadratic-program computations into a neural-network model.
- Reproduce or inspect optimization-layer experiments for denoising, Sudoku and classification.
Requirements & limits
The repository is public and its source code is licensed under Apache 2.0.
- The implementation uses Python, NumPy and PyTorch; qpth is identified as the PyTorch QP solver, with bamos/block also listed as a dependency.
- The README documents experiment scripts and setup dependencies, but does not establish compatibility with current PyTorch releases.
- Optional setGPU support is described for selecting CUDA devices on multi-GPU systems.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Identify the OptNet experiment entry point
Choose the documented experiment script for denoising, Sudoku, or classification.
Before you start
- Python, NumPy, and PyTorch are listed dependencies.
- The README lists qpth and bamos/block as dependencies; setGPU is optional.
Steps
For denoising, use
denoising/main.pyfor the FC baseline and OptNet experiments, ordenoising/main.tv.pyfor the TV baseline.For Sudoku, use
sudoku/main.pyfor the FC baseline and OptNet experiments; the README says the experiment dataset is available insudoku/data.For classification, use
cls/train.pyfor the FC baseline and OptNet experiments.Consult the selected script's arguments before running; the README directs users to “See arguments” but does not provide them.
Expected outcome
You can identify the documented script and data location, where applicable, for each experiment area.
Guide limitations
- The README does not give installation commands, script arguments, or execution instructions.
- The denoising README lists
create.pyandrun-exps.sh, but does not document their invocation; it notes that some lines inrun-exps.shmay need to be uncommented.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 8 November 2026
- Original website title
- locuslab/optnet · Official homepage title · retained in its source language

