divelab / lgcn

GNU General Public License v3.0
136 stars 65 forks source link

There's an error when I run the code #4

Closed Xshelton closed 5 years ago

Xshelton commented 5 years ago

hi,there , I was wondering to run your code but a mistake happened I use the latest tensorflow gpu version and python 3.7.2 here is the error: indices size:--------------> 644 indices size:--------------> 1484 indices size:--------------> 2190 Traceback (most recent call last): File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call return fn(*args) File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "C:\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InternalError: Unsupported feed type

i will try to fix the problem and hope u can give me some advice best regards.

kprojiang commented 5 years ago

hi,there , I was wondering to run your code but a mistake happened I use the latest tensorflow gpu version and python 3.7.2 here is the error: indices size:--------------> 644 indices size:--------------> 1484 indices size:--------------> 2190 Traceback (most recent call last): File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call return fn(*args) File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "C:\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InternalError: Unsupported feed type

i will try to fix the problem and hope u can give me some advice best regards.

I have to say that, the same error occurs when I try to run the code for the first time. The environment is Tensorflow 1.10 Python3.5.

Xshelton commented 5 years ago

Did you solve the problem?

HongyangGao commented 5 years ago

Hi there,

It works on this code: https://github.com/HongyangGao/LGCN. TF version is 1.13. Hope this works for you. Thank you.

Xshelton commented 5 years ago

yep,I downloaded it and reran it,but the error occured again. and it seems to be related to the code :

GraphNet(tf.Session(), conf).train() self.transductive_train() feed_dict=feed_train_dict)

and I searched the website: https://stackoverflow.com/questions/47192396/tensorflow-unsupported-feed-type it says that it occurs because of float32 or something..

Xshelton commented 5 years ago

ok,it seems that I find out where is wrong: replace the build_network with it: change int 32 to int 64 then problem solved.

def build_network(self): self.labels_mask = tf.placeholder(tf.int64, None, name='labels_mask') self.matrix = tf.placeholder(tf.int64, [None, None], name='matrix') self.normed_matrix = tf.placeholder(tf.float32, [None, None], name='normed_matrix') self.inputs = tf.placeholder(tf.float32, [None, self.feas.shape[1]], name='inputs') self.labels = tf.placeholder(tf.int64, [None, self.conf.class_num], name='labels') self.is_train = tf.placeholder(tf.bool, name='is_train') self.preds = self.inference(self.inputs)

HongyangGao commented 5 years ago

OK. I think it's related to the platform or distribution. Thank you.