imayachita / Graph_Convolutional_Networks_Node_Classification

38 stars 28 forks source link

Dimension error while running model.predict() #6

Open sharadlnx opened 3 years ago

sharadlnx commented 3 years ago

I have trained the model successfully but i am getting following error on test data ValueError: Input 1 is incompatible with layer model_2: expected shape=(None, 2708), found shape=(None, 1000)

amar-enkhbat commented 3 years ago

I'm also having the same issue. The tutorial itself is really helpful though. Btw, did you also change function GraphConv to GCNConv?

Edit: for me changing fltr_in = Input((N, ), sparse=True) to fltr_in = Input((None, ), sparse=True) worked.

anitchakraborty commented 3 years ago

Hi guys,

When I'm trying to replicate the solution with another similar dataset, I'm facing a similar dimension mismatch. Can you guys take a look? @imayachita @amar-enkhbat https://stackoverflow.com/questions/67331373/valueerror-input-0-is-incompatible-with-layer-model-2-expected-shape-none-14

imayachita commented 3 years ago

Hi all, I'm really sorry for a very slow response. I have checked the code and seems to me there is a significant change in spektral library that implements the GCN. I have tried installing the same version of Spektral (0.6.0) that I used to write the code earlier but I had the same problem. I am really sorry I can't help much. I will try digging into it if I have some time later.

harshgeek4coder commented 3 years ago

I found the blog and support notebook quite helpful While performing classification report evaluation, I got the same dimension mismatch error.

harshgeek4coder commented 3 years ago

Hi guys,

When I'm trying to replicate the solution with another similar dataset, I'm facing a similar dimension mismatch. Can you guys take a look? @imayachita @amar-enkhbat https://stackoverflow.com/questions/67331373/valueerror-input-0-is-incompatible-with-layer-model-2-expected-shape-none-14

I think you should try changing the Filter_input layer to N -> None, as provided here by @amar-enkhbat : https://github.com/imayachita/Graph_Convolutional_Networks_Node_Classification/issues/6#issuecomment-822300154