Giter VIP home page Giter VIP logo

stepwise's Introduction

Step-wise Deep Learning Models for Solving Routing Problems

Liang Xin, Wen Song, Zhiguang Cao, and Jie Zhang. Step-wise Deep Learning Models for Solving Routing Problems. IEEE Transactions on Industrial Informatics (TII), 2020. (In Press) [https://ieeexplore.ieee.org/document/9226142]

To download the pretrained models and data

python download.py;
tar -zxvf data.tar.gz;
cd SWTAM; tar -zxvf SWTAM_pretrained;
cd ../SWTAM; tar -zxvf ASWTAM_pretrained;
cd ..;

Step-wise Transformer Attention Model (SW-TAM)

To train the SW-TAM models for tsp and cvrp, respectively

python run.py --graph_size 20 --baseline rollout --run_name 'tsp20_rollout' --val_dataset ../data/tsp20.pkl
python run.py --graph_size 20 --baseline rollout --run_name 'vrp20_rollout' --val_dataset ../data/vrp20.pkl --problem="cvrp"

To eval with pretrained models for tsp and cvrp, respectively

python3 run.py --graph_size 20 --load_path pretrained/tsp_20/epoch-99.pt --val_dataset ../data/tsp20.pkl --eval_only
python3 run.py --graph_size 20 --load_path pretrained/cvrp_20/epoch-99.pt --val_dataset ../data/vrp20.pkl --problem="cvrp" --eval_only

Approximate Step-wise Transfomer Attention Model (ASW-TAM)

To train ASW-TAM;

python run.py --graph_size 20 --baseline rollout --run_name 'tsp20_rollout' --val_dataset ../data/tsp20.pkl

To eval with pretrained models

python3 eval.py ../data/tsp20.pkl --model pretrained/tsp_100/epoch-99.pt --decode_strategy greedy

Step-wise Pointer Network (SW-PtrNet)

To train SW-PtrNet

python -u main.py --hidden_dim=256 --log_step=1000 --checkpoint_secs=30000

To eval with pretrained_models

python -u main.py --hidden_dim=256 --log_step=1000 --checkpoint_secs=30000 --load_path pretrained/tsp_2019-08-19_14-04-45/model.ckpt-18000000 --is_train=False

SWTAM and ASWTAM are developed based on https://github.com/wouterkool/attention-learn-to-route SWPtrNet are developed based on https://github.com/devsisters/pointer-network-tensorflow

stepwise's People

Contributors

liangxinedu avatar

Forkers

qyp1997

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.