This paper focuses on a practical quantitative comparison between two optimizers in terms of training performanceand accuracy. We provide a strict experimental protocol fortesting the effectiveness of two recent implementations of Frank and Wolfe and Block coordinate descent for DNNs on a standard digit recognition task.
Here are the different packages needed to reproduce our experiments:
torchtorchvisionnumpymatplotlibmath
To obtain the results :
Run ./src/run.py.
All the following parameters can be tuned in the call of the full_train_test method:
optimizereither "BCD" for Block Coordinate Descent or "DFW" for Deep Frank WolfN_trainthe number of samples of the training setN_testthe number of samples of the validation/test setn_iterthe number of iterationsn_epochsthe number of epochsbatch_sizethe batch size used for training, which must be 1 if optimizer = "BCD"d1,d2,d3the number of nodes of the 1st, 2nd and 3rd layeralpha,gamma,rhothe hyper-parameters if optimizer = "BCD"
The following directory contrains different text documents, code and data files. The structure is detailed below:
report.pdf
./src/utils/data_utils.py: contains helper methods for data loading and preprocessing./src/utils/plot_utils.py: contains helper methods for plotting and to vizualize our results./src/utils/metrics.py: contains a helper methos to compute mean and standard deviation of an array./src/bcd/ModelBCD.py: contains a three layers model class with its differents functions to perform training using Block Coordinate Descent optimizer and to compute the test accuracy./src/dfw/baselines/BPGrad.py: BPGrad optimizer from https://github.com/oval-group/dfw./src/dfw/baselines/hinge.py: MultiClassHingLoss implementation from the same repository as above./src/dfw/dfw.py: Deep Frank Wolfe optimizer also taken from the same repository./src/dfw/ModelDFW.pycontains a three layers model class with its differents functions, to perform training using Deep Frank Wolfe optimizer and to compute the test accuracy./src/run.py: main python script which allows to compare the two optimizers and to modify various parameters as described in the Setup section
./src/results.ipynb: notebook containing the results of our experiments
Lam Olivier @olivierlam97
Zghonda Jalel @zghonda
Laraki Rayane @rlaraki