Codes for AAAI22 paper "Learning to Solve Travelling Salesman Problem with Hardness-Adaptive Curriculum"

Related tags

Deep LearningTSP-HAC
Overview

Paper

For more details, please see our paper Learning to Solve Travelling Salesman Problem with Hardness-Adaptive Curriculum which has been accepted at AAAI 2022. If this code is useful for your work, please cite our paper:

@inproceedings{zhang2022learning,
  title={Learning to Solve Travelling Salesman Problem with Hardness-Adaptive Curriculum},
  author={Zeyang Zhang and Ziwei Zhang and Xin Wang and Wenwu Zhu},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  year={2022}
}

Dependencies

Require python>=3.8

Install other packages

pip install torch matplotlib scipy tqdm tensorboard sklearn jupyter jupyterlab pandas gurobipy seaborn tensorboardX

And follow https://github.com/wouterkool/attention-learn-to-route to install Gurobi Solver. In short, it can be installed by conda:

conda config --add channels http://conda.anaconda.org/gurobi
conda install gurobi

Or manually: Find and download the package in https://anaconda.org/Gurobi/gurobi/files?page=0, then use conda install.

Usage

  1. generate data This step generates necessary TSP Instances for experiments.
python src/generate_data.py --problem tsp --graph_sizes 50 --name val_mg --seed 2222 --dataset_size 10000 --generate_type mg
python src/generate_data.py --problem tsp --graph_sizes 50 --name train --seed 1111 --dataset_size 10000 --generate_type random -f 
python preprocess.py
  1. preliminary study This step shows the optimality gaps of TSP instances generated from gaussian mixture generator as $c_{\text{dist}}$ increases
python preliminary.py
  1. Hardness-adaptive generator This step shows the optimality gaps of TSP instances generated from hardness-adaptive generator as $\eta$ increases
python hag.py
  1. Hardness-adaptive Curriculum This step shows the optimality gaps with or without hardness-adaptive curriculum. In this case, training data and testing data is from uniform and gaussian mixture respectively. Replace 'X' with GPU device id.
CUDA_VISIBLE_DEVICES=X python main.py --train_type uniform --iters 15
CUDA_VISIBLE_DEVICES=X python main.py --train_type hardness-adaptive --iters 15
  1. showcase This step shows some cases of instances generated by hardness-adaptive generator.
python showcase.py

Acknowledgements

This repo is modified mainly based on the code https://github.com/wouterkool/attention-learn-to-route.

End-to-end image segmentation kit based on PaddlePaddle.

English | įŽ€äŊ“中文 PaddleSeg PaddleSeg has released the new version including the following features: Our team won the 6.2k Jan 02, 2023

Code of Adverse Weather Image Translation with Asymmetric and Uncertainty aware GAN

Adverse Weather Image Translation with Asymmetric and Uncertainty-aware GAN (AU-GAN) Official Tensorflow implementation of Adverse Weather Image Trans

Jeong-gi Kwak 36 Dec 26, 2022
Repo for our ICML21 paper Unsupervised Learning of Visual 3D Keypoints for Control

Unsupervised Learning of Visual 3D Keypoints for Control [Project Website] [Paper] Boyuan Chen1, Pieter Abbeel1, Deepak Pathak2 1UC Berkeley 2Carnegie

Boyuan Chen 34 Jul 22, 2022
This is RFA-Toolbox, a simple and easy-to-use library that allows you to optimize your neural network architectures using receptive field analysis (RFA) and create graph visualizations of your architecture.

ReceptiveFieldAnalysisToolbox This is RFA-Toolbox, a simple and easy-to-use library that allows you to optimize your neural network architectures usin

84 Nov 23, 2022
GNPy: Optical Route Planning and DWDM Network Optimization

GNPy is an open-source, community-developed library for building route planning and optimization tools in real-world mesh optical networks

Telecom Infra Project 140 Dec 19, 2022
Project page of the paper 'Analyzing Perception-Distortion Tradeoff using Enhanced Perceptual Super-resolution Network' (ECCVW 2018)

EPSR (Enhanced Perceptual Super-resolution Network) paper This repo provides the test code, pretrained models, and results on benchmark datasets of ou

Subeesh Vasu 78 Nov 19, 2022
Code for technical report "An Improved Baseline for Sentence-level Relation Extraction".

RE_improved_baseline Code for technical report "An Improved Baseline for Sentence-level Relation Extraction". Requirements torch = 1.8.1 transformers

Wenxuan Zhou 74 Nov 29, 2022
QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.

QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.

152 Jan 02, 2023
Pytorch codes for Feature Transfer Learning for Face Recognition with Under-Represented Data

FTLNet_Pytorch Pytorch codes for Feature Transfer Learning for Face Recognition with Under-Represented Data 1. Introduction This repo is an unofficial

1 Nov 04, 2020
In this project we combine techniques from neural voice cloning and musical instrument synthesis to achieve good results from as little as 16 seconds of target data.

Neural Instrument Cloning In this project we combine techniques from neural voice cloning and musical instrument synthesis to achieve good results fro

Erland 127 Dec 23, 2022
Pytorch implementation of four neural network based domain adaptation techniques: DeepCORAL, DDC, CDAN and CDAN+E. Evaluated on benchmark dataset Office31.

Deep-Unsupervised-Domain-Adaptation Pytorch implementation of four neural network based domain adaptation techniques: DeepCORAL, DDC, CDAN and CDAN+E.

Alan Grijalva 49 Dec 20, 2022
đŸ”Ĩ Cannlytics-powered artificial intelligence 🤖

Cannlytics AI đŸ”Ĩ Cannlytics-powered artificial intelligence 🤖 🏗ī¸ Installation 🏃‍♀ī¸ Quickstart 🧱 Development đŸĻž Automation 💸 Support 🏛ī¸ License ?

Cannlytics 3 Nov 11, 2022
MetaAvatar: Learning Animatable Clothed Human Models from Few Depth Images

MetaAvatar: Learning Animatable Clothed Human Models from Few Depth Images This repository contains the implementation of our paper MetaAvatar: Learni

sfwang 96 Dec 13, 2022
Time Series Cross-Validation -- an extension for scikit-learn

TSCV: Time Series Cross-Validation This repository is a scikit-learn extension for time series cross-validation. It introduces gaps between the traini

Wenjie Zheng 222 Jan 01, 2023
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context Code in both PyTorch and TensorFlow

Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context This repository contains the code in both PyTorch and TensorFlow for our paper

Zhilin Yang 3.3k Jan 06, 2023
Towards Flexible Blind JPEG Artifacts Removal (FBCNN, ICCV 2021)

Towards Flexible Blind JPEG Artifacts Removal (FBCNN, ICCV 2021) Jiaxi Jiang, Kai Zhang, Radu Timofte Computer Vision Lab, ETH Zurich, Switzerland đŸ”Ĩ

Jiaxi Jiang 282 Jan 02, 2023
BERTMap: A BERT-Based Ontology Alignment System

BERTMap: A BERT-based Ontology Alignment System Important Notices The relevant paper was accepted in AAAI-2022. Arxiv version is available at: https:/

KRR 36 Dec 24, 2022
The source code of CVPR 2019 paper "Deep Exemplar-based Video Colorization".

Deep Exemplar-based Video Colorization (Pytorch Implementation) Paper | Pretrained Model | Youtube video đŸ”Ĩ | Colab demo Deep Exemplar-based Video Col

Bo Zhang 253 Dec 27, 2022
Flexible Option Learning - NeurIPS 2021

Flexible Option Learning This repository contains code for the paper Flexible Option Learning presented as a Spotlight at NeurIPS 2021. The implementa

Martin Klissarov 7 Nov 09, 2022
Transformer Huffman coding - Complete Huffman coding through transformer

Transformer_Huffman_coding Complete Huffman coding through transformer 2022/2/19

3 May 19, 2022