TensorFlow2 and PyTorch implementation of ATTENTION, LEARN TO SOLVE ROUTING PROBLEMS!(Kool et al. 2019)(https://arxiv.org/pdf/1803.08475.pdf)
Slide Share -- CVRP solver with Multi Heads Attention --
- Python >= 3.6
- TensorFlow >= 2.0
- PyTorch = 1.5
- tqdm
- scipy
- numpy
- plotly (only for plotting)
- matplotlib (only for plotting)
First move to "PyTorch" or "TensorFlow2" dir.
cd PyTorch
Then, generate the pickle file contaning hyperparameter values by running the following command.
python config.py
you would see the pickle file in "Pkl" dir. now you can start training the model.
python train.py -p 'Pkl/***.pkl'
Plot prediction of the pretrained model
python plot.py -p 'Weights/***.h5'
If you want to verify your model, you can use opensource dataset in "OpenData" dir.
python plot.py -p 'Weights/***.h5' -t '../OpenData/A-n***.txt'