Giter Site home page Giter Site logo

gcn_keras's People

Contributors

zhouchunpong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gcn_keras's Issues

setting an array element with a sequence

直接运行代码的时候,报错:setting an array element with a sequence

我的环境是:
win10
python 3.7
tensorflow 1.14.0
keras 2.3.1

另外,能否加个QQ请教一下?我的QQ是:2363405977

Got error when fitting with tensorflow2

I got the following error when running model.fit. How do I fix it?

environment: python3.7 scipy 1.4.1 tensorflow 2.1.0

Using TensorFlow backend.
Loading cora dataset...
Dataset has 2708 nodes, 5429 edges, 1433 features.
Using local pooling filters...
2020-05-05 21:10:48.564918: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-05-05 21:10:48.581495: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f9c91ca7aa0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-05-05 21:10:48.581513: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
Traceback (most recent call last):
File ".../train.py", line 78, in
batch_size=A.shape[0], epochs=1, shuffle=False, verbose=0)
File "/usr/local/lib/python3.7/site-packages/keras/engine/training.py", line 1239, in fit
validation_freq=validation_freq)
File "/usr/local/lib/python3.7/site-packages/keras/engine/training_arrays.py", line 196, in fit_loop
outs = fit_function(ins_batch)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/backend.py", line 3727, in call
outputs = self._graph_fn(*converted_inputs)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 1551, in call
return self._call_impl(args, kwargs)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 1591, in _call_impl
return self._call_flat(args, self.captured_inputs, cancellation_manager)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 1692, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 527, in call
(len(args), len(list(self.signature.input_arg))))
ValueError: Arguments and signature arguments do not match. got: 21, expected: 23

ValueError: setting an array element with a sequence.

tf version: 1.14.0

Train on 2708 samples, validate on 2708 samples
Epoch 1/200
Traceback (most recent call last):
  File "D:\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev\pydevd.py", line 1438, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "D:\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:/Users/PC/Desktop/GCN_Keras-master/train.py", line 85, in <module>
    callbacks=[es_callback])
  File "D:\python37\lib\site-packages\keras\engine\training.py", line 1239, in fit
    validation_freq=validation_freq)
  File "D:\python37\lib\site-packages\keras\engine\training_arrays.py", line 196, in fit_loop
    outs = fit_function(ins_batch)
  File "D:\python37\lib\site-packages\tensorflow\python\keras\backend.py", line 3277, in __call__
    dtype=tensor_type.as_numpy_dtype))
  File "D:\python37\lib\site-packages\numpy\core\_asarray.py", line 85, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.

How to solve it?

function not found

in MCGCN.py
line 25,26

A, X, y_train, y_val, y_test, train_mask, val_mask, test_mask = load_original_data( 'cora')  # {'cora', 'citeseer', 'pubmed'}
X = preprocess_features(X)

模型调用报错

运行:
predict = model.predict(X)
报错:
ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 6 array(s), but instead got the following list of 1 arrays: [array([[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.