keras-gcn icon indicating copy to clipboard operation
keras-gcn copied to clipboard

ValueError: Only provide the `shape` OR `batch_input_shape` argument to Input, not both at the same time.

Open mullerhai opened this issue 4 years ago • 4 comments

keras 2.4.3 tensorflow 2.3.1

when I want to run train.py ,get the error from here

error log /Users/apple/opt/anaconda3/envs/mullerenv/bin/python /Users/apple/Documents/codezoom/keras-gcn/kegra/train.py Loading cora dataset... Dataset has 2708 nodes, 5429 edges, 1433 features. Using Chebyshev polynomial basis filters... Calculating largest eigenvalue of normalized graph Laplacian... Calculating Chebyshev polynomials up to order 2... Traceback (most recent call last): File "/Users/apple/Documents/codezoom/keras-gcn/kegra/train.py", line 44, in G = [Input(shape=(None, None), batch_shape=(None, None), sparse=True) for _ in range(support)] File "/Users/apple/Documents/codezoom/keras-gcn/kegra/train.py", line 44, in G = [Input(shape=(None, None), batch_shape=(None, None), sparse=True) for _ in range(support)] File "/Users/apple/opt/anaconda3/envs/mullerenv/lib/python3.6/site-packages/tensorflow/python/keras/engine/input_layer.py", line 295, in Input raise ValueError('Only provide the shape OR batch_input_shape argument ' ValueError: Only provide the shape OR batch_input_shape argument to Input, not both at the same time.

mullerhai avatar Dec 09 '20 03:12 mullerhai

Hi mullerhai, I faced the same error. Did you manage to run it? If Yes, can you share with me, please? Many thanks!

rudanie89 avatar Jan 04 '21 22:01 rudanie89

I created a pull request which fixed this issue. waiting for the review. https://github.com/tkipf/keras-gcn/pull/66

ratmcu avatar Apr 16 '21 14:04 ratmcu

I created a pull request which fixed this issue. waiting for the review. #66

Thanks for your help. It works fine with your code. However, even after using your code, when I change the FILTER in train.py from 'localpool' to 'chebyshev', The error below occurs again:

ValueError: Only provide the shape OR batch_input_shape argument to Input, not both at the same time.

How could I manage this error? When I google it, it says it's a problem of tensorflow version... Thanks a lot!

keejoo avatar May 18 '22 08:05 keejoo

Is the problem solved now? Can you tell me?

whaiwan avatar Apr 01 '23 05:04 whaiwan