Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why output dimension is only select the first? #32

Open
kingofkill opened this issue Mar 29, 2022 · 3 comments
Open

Why output dimension is only select the first? #32

kingofkill opened this issue Mar 29, 2022 · 3 comments

Comments

@kingofkill
Copy link

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.

@nataliekoh
Copy link

I have the same question.

@boykovdn
Copy link

boykovdn commented Oct 6, 2023

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.

@HQ-LV
Copy link

HQ-LV commented Mar 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants