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

Error: Dimensions of inputs should match #128

Open
guelfaure opened this issue Mar 20, 2024 · 4 comments
Open

Error: Dimensions of inputs should match #128

guelfaure opened this issue Mar 20, 2024 · 4 comments

Comments

@guelfaure
Copy link

This error appear when i try to train my GNN on graph datasets in order to optimize makespan of RCPSP problem.
The error disapear when i clear the dataset and i keep only few graphs (4-5 not more).
I tried to changed every parameter in train_options and model_description but nothing solved my problem.

model_GNN_beta.zip

Image with the full error message in attachment.


thumbnail_image

@MiquelFerriol
Copy link
Collaborator

Dear @guelfaure,
I do not see any problem with your model description.

Following the error image you posted, it looks like the error was raised during the initialization of the hidden states. I would make sure that all the variables you use in the hidden state creation (duration, ressources_needed, duration_other, ressources_needed_other, ressources_available) have the same length in all the samples.

Otherwise, if possible, please share with us some of the graphs used to reproduce the error and fix it.

Thanks,
Miquel

@guelfaure
Copy link
Author

Dear @MiquelFerriol,
Thanks for your answer! I have checked that all the variables have the same length, which was the case. I am still not understanding where come from my error but i try to fix it.

I attach to this message some of the graphs from my dataset.

*After some modifications i deduced that the second dimension of shape[1] (12) from the photo of my first message is equal to the parameter "state_dimension" - 4. But i don't know exactly why. The first dimension is still a mistery.

Thanks in advance for your help!!
train.json

@MiquelFerriol
Copy link
Collaborator

Hi @guelfaure,

After reviewing the train.json file, I noticed an error concerning nodes of type 'time' lacking the 'ressources_available' variable. This discrepancy affects several graphs, including:

Graph 3: Node ID: time2
Graph 4: Node ID: time2
Graph 5: Node ID: time2
Graph 19: Node ID: time20
Graph 20: Node ID: time20

For IGNNITION to function properly, all nodes within the same entity type should possess the same parameters and lengths.

To verify the impact, I've provided a "corrected" revision of the train.json file, removing the affected graphs.

train_corrected.json

Having said that, thank you for pointing this out. We'll implement an error-checking mechanism to detect these types of issues in the future to provide the user with a clearer explanation of the error.

Best regards,
Miquel

@guelfaure
Copy link
Author

Thank you very much for your help! I missed those nodes because they were added automatically by my algorithm during the creation of the graphs as they were appearing in a link (whereas they should not).

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

2 participants