新增SolarEnergy-iTransformer配置

This commit is contained in:
czzhangheng 2025-12-09 16:56:30 +08:00
parent faeb90e734
commit b57fcef039
10 changed files with 383 additions and 2 deletions

18
.vscode/launch.json vendored
View File

@ -2097,6 +2097,22 @@
"program": "run.py",
"console": "integratedTerminal",
"args": "--config ./config/iTransformer/METR-LA.yaml"
}
},
{
"name": "iTransformer: AirQuality",
"type": "debugpy",
"request": "launch",
"program": "run.py",
"console": "integratedTerminal",
"args": "--config ./config/iTransformer/AirQuality.yaml"
},
{
"name": "iTransformer: SolarEnergy",
"type": "debugpy",
"request": "launch",
"program": "run.py",
"console": "integratedTerminal",
"args": "--config ./config/iTransformer/SolarEnergy.yaml"
},
]
}

View File

@ -0,0 +1,52 @@
basic:
dataset: AirQuality
device: cuda:0
mode: train
model: iTransformer
seed: 2023
data:
batch_size: 16
column_wise: false
days_per_week: 7
horizon: 24
input_dim: 6
lag: 24
normalizer: std
num_nodes: 35
steps_per_day: 24
test_ratio: 0.2
val_ratio: 0.2
model:
activation: gelu
seq_len: 24
pred_len: 24
d_model: 128
d_ff: 2048
dropout: 0.1
e_layers: 2
n_heads: 8
output_attention: False
train:
batch_size: 16
debug: false
early_stop: true
early_stop_patience: 15
epochs: 100
grad_norm: false
log_step: 1000
loss_func: mae
lr_decay: true
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
lr_init: 0.0001
mae_thresh: None
mape_thresh: 0.001
max_grad_norm: 5
output_dim: 35
plot: false
real_value: true
weight_decay: 0

View File

@ -0,0 +1,52 @@
basic:
dataset: BJTaxi-InFlow
device: cuda:0
mode: train
model: iTransformer
seed: 2023
data:
batch_size: 32
column_wise: false
days_per_week: 7
horizon: 24
input_dim: 1
lag: 24
normalizer: std
num_nodes: 1024
steps_per_day: 48
test_ratio: 0.2
val_ratio: 0.2
model:
activation: gelu
seq_len: 24
pred_len: 24
d_model: 128
d_ff: 2048
dropout: 0.1
e_layers: 2
n_heads: 8
output_attention: False
train:
batch_size: 16
debug: false
early_stop: true
early_stop_patience: 15
epochs: 100
grad_norm: false
log_step: 1000
loss_func: mae
lr_decay: true
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
lr_init: 0.0001
mae_thresh: None
mape_thresh: 0.001
max_grad_norm: 5
output_dim: 1024
plot: false
real_value: true
weight_decay: 0

View File

@ -0,0 +1,52 @@
basic:
dataset: BJTaxi-OutFlow
device: cuda:0
mode: train
model: iTransformer
seed: 2023
data:
batch_size: 32
column_wise: false
days_per_week: 7
horizon: 24
input_dim: 1
lag: 24
normalizer: std
num_nodes: 1024
steps_per_day: 48
test_ratio: 0.2
val_ratio: 0.2
model:
activation: gelu
seq_len: 24
pred_len: 24
d_model: 128
d_ff: 2048
dropout: 0.1
e_layers: 2
n_heads: 8
output_attention: False
train:
batch_size: 16
debug: false
early_stop: true
early_stop_patience: 15
epochs: 100
grad_norm: false
log_step: 1000
loss_func: mae
lr_decay: true
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
lr_init: 0.0001
mae_thresh: None
mape_thresh: 0.001
max_grad_norm: 5
output_dim: 1024
plot: false
real_value: true
weight_decay: 0

View File

@ -1,6 +1,6 @@
basic:
dataset: METR-LA
device: cuda:0
device: cuda:1
mode: train
model: iTransformer
seed: 2023

View File

@ -0,0 +1,52 @@
basic:
dataset: NYCBike-InFlow
device: cuda:0
mode: train
model: iTransformer
seed: 2023
data:
batch_size: 32
column_wise: false
days_per_week: 7
horizon: 24
input_dim: 1
lag: 24
normalizer: std
num_nodes: 128
steps_per_day: 48
test_ratio: 0.2
val_ratio: 0.2
model:
activation: gelu
seq_len: 24
pred_len: 24
d_model: 128
d_ff: 2048
dropout: 0.1
e_layers: 2
n_heads: 8
output_attention: False
train:
batch_size: 16
debug: false
early_stop: true
early_stop_patience: 15
epochs: 100
grad_norm: false
log_step: 1000
loss_func: mae
lr_decay: true
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
lr_init: 0.0001
mae_thresh: None
mape_thresh: 0.001
max_grad_norm: 5
output_dim: 128
plot: false
real_value: true
weight_decay: 0

View File

@ -0,0 +1,52 @@
basic:
dataset: NYCBike-OutFlow
device: cuda:0
mode: train
model: iTransformer
seed: 2023
data:
batch_size: 32
column_wise: false
days_per_week: 7
horizon: 24
input_dim: 1
lag: 24
normalizer: std
num_nodes: 128
steps_per_day: 48
test_ratio: 0.2
val_ratio: 0.2
model:
activation: gelu
seq_len: 24
pred_len: 24
d_model: 128
d_ff: 2048
dropout: 0.1
e_layers: 2
n_heads: 8
output_attention: False
train:
batch_size: 16
debug: false
early_stop: true
early_stop_patience: 15
epochs: 100
grad_norm: false
log_step: 1000
loss_func: mae
lr_decay: true
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
lr_init: 0.0001
mae_thresh: None
mape_thresh: 0.001
max_grad_norm: 5
output_dim: 128
plot: false
real_value: true
weight_decay: 0

View File

@ -0,0 +1,52 @@
basic:
dataset: PEMS-BAY
device: cuda:0
mode: train
model: iTransformer
seed: 2023
data:
batch_size: 16
column_wise: false
days_per_week: 7
horizon: 24
input_dim: 1
lag: 24
normalizer: std
num_nodes: 325
steps_per_day: 288
test_ratio: 0.2
val_ratio: 0.2
model:
activation: gelu
seq_len: 24
pred_len: 24
d_model: 128
d_ff: 2048
dropout: 0.1
e_layers: 2
n_heads: 8
output_attention: False
train:
batch_size: 16
debug: false
early_stop: true
early_stop_patience: 15
epochs: 100
grad_norm: false
log_step: 1000
loss_func: mae
lr_decay: true
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
lr_init: 0.0001
mae_thresh: None
mape_thresh: 0.001
max_grad_norm: 5
output_dim: 325
plot: false
real_value: true
weight_decay: 0

View File

@ -0,0 +1,52 @@
basic:
dataset: SolarEnergy
device: cuda:0
mode: train
model: iTransformer
seed: 2023
data:
batch_size: 16
column_wise: false
days_per_week: 7
horizon: 24
input_dim: 6
lag: 24
normalizer: std
num_nodes: 137
steps_per_day: 24
test_ratio: 0.2
val_ratio: 0.2
model:
activation: gelu
seq_len: 24
pred_len: 24
d_model: 128
d_ff: 2048
dropout: 0.1
e_layers: 2
n_heads: 8
output_attention: False
train:
batch_size: 16
debug: false
early_stop: true
early_stop_patience: 15
epochs: 100
grad_norm: false
log_step: 1000
loss_func: mae
lr_decay: true
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
lr_init: 0.0001
mae_thresh: None
mape_thresh: 0.001
max_grad_norm: 5
output_dim: 137
plot: false
real_value: true
weight_decay: 0

View File

@ -7,6 +7,7 @@ import torch
def get_dataloader(args, normalizer="std", single=True):
data = load_st_dataset(args)
data = data[..., 0:1]
args = args["data"]
L, N, F = data.shape