Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

The Deep Equilibrium Net Benchmark Model

This script provides the code used to model and solve the benchmark model in Azinovic, Gaegauf, & Scheidegger (2022) (see section 3). For a more streamlined application, see the analytic notebook.

Prerequisites / Installation

Note that, this script was originally programmed in TensorFlow 1. The current default version of TensorFlow is now TensorFlow 2. This script is TensorFlow 2 compatible. To install the correct version, use

    $ pip install tensorflow

Usage

There are two modes to run this code:

  1. the final network weights presented in the paper can be loaded and used to output a host of plots,
  2. the deep equilibrium net can be trained from scratch.

We have simplified the code such that the only user input is the desired running mode. To run, follow these instructions:

In terminal:

    $ cd <PATH to the repository>/DeepEquilibriumNets/code/python-scripts/benchmark

Mode 1: Load the trained network weights

    $ python benchmark.py

The results are saved to ./output/deqn_benchmark_restart.

Mode 2: Train from scratch

    $ python benchmark.py --train_from_scratch

The results are saved to ./output/deqn_benchmark.

Note: the results presented in the paper (see, section 5) were achieved by training the neural network on 2 training schedules. Once the first training schedule is complete (after running the above command), uncomment lines 1314-1320 and run the previous command again (python benchmark.py --train_from_scratch). The results are saved to ./output/deqn_benchmark_2ndschedule.