Reference code for Feature-wise Latent Additive Networks.
To run the code, it is advised to create an environment:
conda create --name flan python=3.6
conda activate flanAnd install the repo (in editable mode if you wish to play around with the code)
pip install -e .Troubleshooting: If you incur in some issues with the requirements, try to comment out the requirements throwing the error. Some of the requirements included are not necessary.
The main scripts are:
bin/run_experiment.pyfor running the training of a FLANetwork. The flag--interactivecan be used to run in verbose mode (i.e. showing the training updates). If the config file points to a folder containing a checkpoint, this will be loaded and the training will continue from there. In particular if the model already reached the epoch indicated, then only the test accuracy will be printed. To specify the config file, use the flag--config_filefollowed by the path to the config file.bin/benchmark_tabular.pyto run the benchmarking code for tabular experiments.bin/results_analysis.pyto analyze the results (especially creta the figures for the cub results). The--helpflag should report the relevant flags and arguments to use to generate results figures. In particular, the--print_test_accuracyflag can be used to print the test accuracy.
Troubleshooting: If you incur in some issues with missing datasets, a relevant error mentioning where to download the dataset should be raised.
We include the config files and checkpoints of the best performing models. Note that the config files should be modified to point to the correct folders.