Code for training and testing CNNs for learning (algebraic) connectivity maximizing network configurations as outlined in our paper Learning Connectivity-Maximizing Network Configurations. To cite this work use the following BibTeX entry:
@article{mox2022learning,
author={Mox, Daniel and Kumar, Vijay and Ribeiro, Alejandro},
journal={IEEE Robotics and Automation Letters},
title={Learning Connectivity-Maximizing Network Configurations},
year={2022},
volume={7},
number={2},
pages={5552-5559},
doi={10.1109/LRA.2022.3146524}
}Clone the repository and initialize submodules:
git clone https://github.com/danmox/learning-connectivity.gitIt is highly recommended that this project be used in conjunction with a virtual environment. Python dependencies can be installed with:
pip install -r requirements.txtNote that the project requires Python 3.
Each of the python files in the top level directory comes with a commandline interface. See the help string for usage instructions:
python <file.py> -hNew datasets can be generated using hdf5_dataset_utils.py (e.g. python hdf5_dataset_utils.py generate --scale 2 100000 3 to generate 100,000 256x256 image pairs with 3 task agents in the input image). Existing datasets for task agent teams of 2-6 agents can be downloaded here.
Limited pre-trained models can be found in the models directory. The model used in the paper is ConvAEModel_px256_nf128_8x8kern__256_2t2t3t3t4t5t6t__valloss_4.199e-04_epoch_14__20211202-054934.ckpt.
To train a new ConvAEModel_px256_nf128_8x8kern model on the 256px datasets (assuming they have been downloaded to data/256px) directory for 20 epochs:
python cnn.py train ConvAEModel_px256_nf128_8x8kern data/256px/256_connectivity_100000s_*.hdf5 --epochs 20Other possible network models to train can be found in models.py.
A variety of different tests can be run on trained networks with cnn_results.py. See the help string for more information. All tests can be run with the run_tests script.