Constrained Neural Network Training via Reachability Analysis
Paper: https://arxiv.org/abs/2107.07696
(Developed and tested on Windows with GPU support)
- Make sure anaconda is setup. Open anaconda prompt
- Create conda environment:
conda env create -f environment.yml
- Activate newly created environment:
conda activate reach-net
- Install cvxpy:
pip install cvxpy
- Install cvxpylayers:
pip install cvxpylayers
- Install pypoman:
pip install pypoman
- Install (latest) pytorch with CUDA support:
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
- Open new anaconda prompt and activate environment
- Run
code
to open VSCode - In bottom left corner of VSCode, select interpreter
'reach-net': conda
- In upper right corner of VSCode, select kernel
'reach-net': conda
(May need to go to Preferences > Search "path" and select "python" and add path to anaconda envs to "Venv Path")
Main notebook for generating results is constrained_opt.ipynb