Graph_Convolutional_Networks_Node_Classification icon indicating copy to clipboard operation
Graph_Convolutional_Networks_Node_Classification copied to clipboard

Dimension error while running model.predict()

Open sharadlnx opened this issue 4 years ago • 5 comments

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)

sharadlnx avatar Apr 05 '21 10:04 sharadlnx

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.

amar-enkhbat avatar Apr 19 '21 08:04 amar-enkhbat

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

anitchakraborty avatar Apr 30 '21 11:04 anitchakraborty

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.

imayachita avatar May 03 '21 18:05 imayachita

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

harshgeek4coder avatar Jun 19 '21 12:06 harshgeek4coder

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

harshgeek4coder avatar Jun 19 '21 12:06 harshgeek4coder