jacklu2016 / ADM-VRP

Comparison of Attention Mechanisms in Machine Learning Models for Vehicle Routing Problems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comparison of Attention Mechanisms in Machine Learning Models for Vehicle Routing Problems

This repository contains the implementation of our project titled 'Comparison of Attention Mechanisms in Machine Learning Models for Vehicle Routing Problems' (TensorFlow2).

This work was done as a final year project under the guidance of Dr. Georg Gutjahr".


File Description

  1. AM-D for VRP Report.ipynb - demo report notebook
  2. enviroment.py - enviroment for VRP RL Agent
  3. layers.py - MHA layers for encoder
  4. attention_graph_encoder.py - Graph Attention Encoder
  5. reinforce_baseline.py - class for REINFORCE baseline
  6. attention_dynamic_model_x-head(s).py - main model and decoder with x number of head(s)
  7. train.py - defines training loop which we use in train_model.ipynb
  8. train_model.ipynb - from this file one can start training or continue training from chechpoint
  9. utils.py and utils_demo.py - various auxiliary functions for data creation, saving and visualisation
  10. lkh3_baseline folder - everything for running LKH algorithm + logs.
  11. results folder: folder name is ADM_VRP_{graph_size}_{batch_size}. There are training logs, learning curves and saved models in each folder

Training procedure:

  1. Open train_model.ipynb and choose training parameters and choose the required number of heads by editing the file name at 'from attention_dynamic_model' .
  2. All outputs would be saved in current directory.

Majority of this code has been fetched from a publicly available repository of The Dynamic Attention Model

About

Comparison of Attention Mechanisms in Machine Learning Models for Vehicle Routing Problems


Languages

Language:Jupyter Notebook 97.9%Language:Python 2.1%