Jhonlv / Traffic-Transformer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Traffic Transformer

A pytorch implementation of Traffic Transformer for traffic forecasting.

Acknowledgement

Thank to the authors of Graph WaveNet and DCRNN. My work stands on their basic code and data.

Requirements

  • python 3
  • see requirements.txt

Data

Step1: Download METR-LA data from Google Drive or Baidu Yun links provided by DCRNN.

Step2: Process raw data

# Create data directories
mkdir -p data/{METR-LA}

# METR-LA
python generate_training_data.py --output_dir=data/METR-LA --traffic_df_filename=data/metr-la.h5

Train

python train.py

Test

python test.py

About


Languages

Language:Python 100.0%