Graph-WaveNet icon indicating copy to clipboard operation
Graph-WaveNet copied to clipboard

Why output dimension is only select the first?

Open kingofkill opened this issue 3 years ago • 3 comments

The code metrics = engine.train(trainx, trainy[:, 0, :, :]) in line84 of train.py seems only predict one dimension of total D dimension. But the paper wrote the output dimension is D.

kingofkill avatar Mar 29 '22 09:03 kingofkill

I have the same question.

nataliekoh avatar Mar 10 '23 04:03 nataliekoh

Output dimension is 12, which is the number of steps ahead their model predicts. The shape of trainy is (B,2,N,T) where B is the batch size, N is the number of nodes, and T is 12. The second dimension here is the features of the data as they come in from the loader, which is the traffic flow (z-normalised) at 0, and the periodic signal at 1. They only want to predict the traffic flow, so they take the 0th dimension.

boykovdn avatar Oct 06 '23 13:10 boykovdn

Hello! If I want the feature_dimension in the output of gwnet in model.py to be 2 (the default feature_dimension=1 in the source code), how should I modify the gwnet part? Additionally, I have a question: I understand that the convolution operations in gwnet are performed along the feature dimension, and the output shape of the model is [batch_size, feature_dim, num_nodes, seq_len] where feature_dimension=12 and seq_len=1. However, in line 18 of engine.py, the output is transposed directly, changing the feature dimension to the seq_len dimension. I wonder if this handling is reasonable.

HQ-LV avatar Mar 25 '24 15:03 HQ-LV