Upload DCRNN model trained on METR-LA
Browse files- README.md +63 -0
- config.json +49 -0
- dcrnn_model.pth +3 -0
- metadata.json +9 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- traffic-forecasting
|
| 4 |
+
- time-series
|
| 5 |
+
- graph-neural-network
|
| 6 |
+
- dcrnn
|
| 7 |
+
datasets:
|
| 8 |
+
- metr-la
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# DCRNN Model - METR-LA
|
| 12 |
+
|
| 13 |
+
Diffusion Convolutional Recurrent Neural Network (DCRNN) trained on METR-LA dataset for traffic speed forecasting.
|
| 14 |
+
|
| 15 |
+
## Model Description
|
| 16 |
+
|
| 17 |
+
This model uses a graph neural network architecture that combines:
|
| 18 |
+
- Diffusion convolution to capture spatial dependencies on road networks
|
| 19 |
+
- Recurrent neural networks (GRU) for temporal modeling
|
| 20 |
+
- Sequence-to-sequence learning for multi-step ahead forecasting
|
| 21 |
+
|
| 22 |
+
## Evaluation Metrics
|
| 23 |
+
|
| 24 |
+
- **test_mae**: 12.0126
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
## Dataset
|
| 28 |
+
|
| 29 |
+
**METR-LA**: Traffic speed data from highway sensors.
|
| 30 |
+
|
| 31 |
+
## Usage
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from dcrnn_pytorch.model.pytorch.dcrnn_supervisor import DCRNNSupervisor
|
| 35 |
+
from utils.dcrnn import load_from_hub
|
| 36 |
+
|
| 37 |
+
# Download checkpoint
|
| 38 |
+
checkpoint_path = load_from_hub("your-username/dcrnn-metr-la")
|
| 39 |
+
|
| 40 |
+
# Load model (requires config and adj_mx from checkpoint)
|
| 41 |
+
# See documentation for full loading example
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Training
|
| 45 |
+
|
| 46 |
+
Model was trained using the DCRNN PyTorch implementation with default hyperparameters.
|
| 47 |
+
|
| 48 |
+
## Citation
|
| 49 |
+
|
| 50 |
+
If you use this model, please cite the original DCRNN paper:
|
| 51 |
+
|
| 52 |
+
```
|
| 53 |
+
@inproceedings{li2018dcrnn,
|
| 54 |
+
title={Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting},
|
| 55 |
+
author={Li, Yaguang and Yu, Rose and Shahabi, Cyrus and Liu, Yan},
|
| 56 |
+
booktitle={International Conference on Learning Representations (ICLR)},
|
| 57 |
+
year={2018}
|
| 58 |
+
}
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
## License
|
| 62 |
+
|
| 63 |
+
This model checkpoint is released under the same license as the training code.
|
config.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 0,
|
| 3 |
+
"scaler": {
|
| 4 |
+
"mean": "54.405926",
|
| 5 |
+
"std": "19.49374"
|
| 6 |
+
},
|
| 7 |
+
"model_config": {
|
| 8 |
+
"cl_decay_steps": 2000,
|
| 9 |
+
"filter_type": "dual_random_walk",
|
| 10 |
+
"horizon": 12,
|
| 11 |
+
"input_dim": 2,
|
| 12 |
+
"l1_decay": 0,
|
| 13 |
+
"max_diffusion_step": 2,
|
| 14 |
+
"num_nodes": 207,
|
| 15 |
+
"num_rnn_layers": 2,
|
| 16 |
+
"output_dim": 1,
|
| 17 |
+
"rnn_units": 64,
|
| 18 |
+
"seq_len": 12,
|
| 19 |
+
"use_curriculum_learning": true
|
| 20 |
+
},
|
| 21 |
+
"data_config": {
|
| 22 |
+
"batch_size": 64,
|
| 23 |
+
"dataset_dir": "data/METR-LA",
|
| 24 |
+
"test_batch_size": 64,
|
| 25 |
+
"val_batch_size": 64,
|
| 26 |
+
"graph_pkl_filename": "data/sensor_graph/adj_mx.pkl"
|
| 27 |
+
},
|
| 28 |
+
"train_config": {
|
| 29 |
+
"base_lr": 0.01,
|
| 30 |
+
"dropout": 0,
|
| 31 |
+
"epoch": 0,
|
| 32 |
+
"epochs": 100,
|
| 33 |
+
"epsilon": 0.001,
|
| 34 |
+
"global_step": 0,
|
| 35 |
+
"lr_decay_ratio": 0.1,
|
| 36 |
+
"max_grad_norm": 5,
|
| 37 |
+
"max_to_keep": 100,
|
| 38 |
+
"min_learning_rate": 2e-06,
|
| 39 |
+
"optimizer": "adam",
|
| 40 |
+
"patience": 50,
|
| 41 |
+
"steps": [
|
| 42 |
+
20,
|
| 43 |
+
30,
|
| 44 |
+
40,
|
| 45 |
+
50
|
| 46 |
+
],
|
| 47 |
+
"test_every_n_epochs": 10
|
| 48 |
+
}
|
| 49 |
+
}
|
dcrnn_model.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d07a8af6668d280b1ecda0941b3b38199a65009efac6c8073ed6e8dbcdaf9d73
|
| 3 |
+
size 1497677
|
metadata.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"dataset": "METR-LA",
|
| 3 |
+
"upload_date": "2025-11-01T21:53:26.458756",
|
| 4 |
+
"metrics": {
|
| 5 |
+
"test_mae": 12.012598443914342
|
| 6 |
+
},
|
| 7 |
+
"framework": "PyTorch",
|
| 8 |
+
"model_type": "DCRNN"
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1306206e5996a5336b7f7df832fc7a0aeb32148489262d84f07a7d7573895b92
|
| 3 |
+
size 1491428
|