Closed tide1994cc closed 2 years ago
在tf1.4下运行试试
还是 不行。。。
if self.bias 后面加上 is not None
if self.bias 后面加上 is not None
I think it should change self.bias
to self.use_bias
and remove act._uses_learning_phase = features._uses_learning_phase
And then , i meet error ValueError: setting an array element with a sequence.
And don't how to deal with it.
I only run success in run_gat_cora.py
I also meet error Unsupported feed type
in run_graphsage_cora
And don't know how to deal with it.
I see the code in book is pytorch, but why on the github, it turns out TensorFlow??
好吧 大家都是中国人,作者是不是不打算回应后续问题了呢? 跪求作者解惑!
书上代码是pytorch版的,而且看起来更加易懂,为什么要改成不好debug的TensorFlow版的呢?而且在更改过程中,好像还因此出现了问题,作者确定可以运行成功吗? 跪求作者大大解惑!
if self.bias 后面加上 is not None
I think it should change
self.bias
toself.use_bias
and remove act._uses_learning_phase = features._uses_learning_phaseAnd then , i meet error
ValueError: setting an array element with a sequence.
And don't how to deal with it. I only run success inrun_gat_cora.py
I also meet errorUnsupported feed type
inrun_graphsage_cora
And don't know how to deal with it.I see the code in book is pytorch, but why on the github, it turns out TensorFlow??
I can run the run_graphsage_cora
and run_gat_cora.py
with the implementation of tf 1.14.0
but I also met the error in run_gcn_cora.py
, the info is following:
Traceback (most recent call last): File "run_gcn_cora.py", line 32, infeature_less=FEATURE_LESS, ) File "/root/Lnq/GraphNeuralNetwork/gnn/gcn.py", line 113, in GCN h = GraphConvolution(n_hidden, activation=activation, dropout_rate=dropout_rate, l2_reg=l2_reg)([h,Adj]) File "/usr/local/miniconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/keras/engine/base_layer.py", line 634, in __call__ outputs = call_fn(inputs, *args, **kwargs) File "/usr/local/miniconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/autograph/impl/api.py", line 149, in wrapper raise e.ag_error_metadata.to_exception(type(e)) TypeError: in converted code: /root/Lnq/GraphNeuralNetwork/gnn/gcn.py:74 call if self.bias: /usr/local/miniconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/ops/resource_variable_ops.py:777 __bool__ return bool(self.read_value()) /usr/local/miniconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/framework/ops.py:690 __bool__ raise TypeError("Using a `tf.Tensor` as a Python `bool` is not allowed. "
I notice maybe there are errors about the number of parameters in function GCN
, but I don't know how to deal with it.
gcn.py : [Line 72]output = tf.matmul(tf.matmul(A, features), self.kernel) # fix by ls [Line 73] if self.use_bias: # fix by ls [Line 95] Adj = Input(shape=(adj_dim,)) # fix by ls
I fix the bug ValueError: setting an array element with a sequence. like this. @shazhongcheng
TypeError: in converted code:
TypeError: Input 'pred' of 'Switch' Op has type float32 that does not match expected type of bool.