Open hellomuse opened 5 years ago
Traceback (most recent call last): File "/Users/linda/mywork/ARGA-master/ARGA/arga/run.py", line 18, in runner.erun() File "/Users/linda/mywork/ARGA-master/ARGA/arga/link_prediction.py", line 27, in erun placeholders = get_placeholder(feas['adj']) KeyError: 'adj'
I met this problem, too. And I solved it by using python with version 3.7, and I run it successfully now.
Using py37, However, you may need to modify several pieces of code.
Traceback (most recent call last): File "/Users/linda/mywork/ARGA-master/ARGA/arga/run.py", line 18, in runner.erun() File "/Users/linda/mywork/ARGA-master/ARGA/arga/link_prediction.py", line 27, in erun placeholders = get_placeholder(feas['adj']) KeyError: 'adj'
I met this problem, too. And I solved it by using python with version 3.7, and I run it successfully now.
Using py37, However, you may need to modify several pieces of code.
Hello EdisonLeeeee,
I am trying to use the ARGA model with py37 too. So I need to modify the code in order to make it work. I am having some problems with that however. Could you be contact me? I could use your help.
Traceback (most recent call last): File "/Users/linda/mywork/ARGA-master/ARGA/arga/run.py", line 18, in runner.erun() File "/Users/linda/mywork/ARGA-master/ARGA/arga/link_prediction.py", line 27, in erun placeholders = get_placeholder(feas['adj']) KeyError: 'adj'
I met this problem, too. And I solved it by using python with version 3.7, and I run it successfully now. Using py37, However, you may need to modify several pieces of code.
Hello EdisonLeeeee,
I am trying to use the ARGA model with py37 too. So I need to modify the code in order to make it work. I am having some problems with that however. Could you be contact me? I could use your help.
Hi TrabelsiAhmed.
Can I do anything to help?
Hi,
I am trying to debug the code step by step. Currently I am stuck with something that seems to be easy to solve.
I am getting this error:
Traceback (most recent call last):
File "C:\ARGA\ARGA\arga\run.py", line 18, in
File "C:\ARGA\ARGA\arga\link_prediction.py", line 25, in erun feas = format_data(self.data_name)
File "C:\ARGA\ARGA\arga\constructor.py", line 43, in format_data adj, features, y_test, tx, ty, test_maks, true_labels = load_data(data_name)
File "C:\ARGA\ARGA\arga\input_data.py", line 24, in load_data objects.append(pkl.load(open("data/ind.{}.{}".format(dataset, names[i])), encoding = 'ansi', errors = 'ignore'))
File "E:\Programme\py\envs\keras-gpu\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 34: character maps to
I tried to solve it by trying different encodings, by addind errors = 'ignore'. But nothing works. Can you please tell, what did you do to solve this?
Thank you in advance
well, it is easy to solve this problem.
First I will introduce the solution below:
change the code in input.py, line 23-25
:
for i in range(len(names)):
objects.append(pkl.load(open("data/ind.{}.{}".format(dataset, names[i]))))
to
for name in names:
with open("data/ind.{}.{}".format(dataset, name), 'rb') as f:
objects.append(pkl.load(f, encoding='latin1'))
It occurs because of the version of pickle
. (Not exactly!)
Hope it help for you!
Yes it worked, thank you so much!
Of course I got another error, i will try to solve it myself.
Is it okey to contact you again if i get in trouble again? xD
Sure, but I'm not sure I'll be able to reply in time. XD
No problem, only if you have time ofcourse :D
Hi, I need help again xD
Traceback (most recent call last):
File "C:\ARGA\ARGA\arga\run.py", line 18, in
File "C:\ARGA\ARGA\arga\link_prediction.py", line 34, in erun opt = get_optimizer(model_str, ae_model, discriminator, placeholders, feas['pos_weight'], feas['norm'], d_real, feas['num_nodes'])
File "C:\ARGA\ARGA\arga\constructor.py", line 90, in get_optimizer d_fake=d_fake)
File "C:\ARGA\ARGA\arga\optimizer.py", line 43, in init beta1=0.9, name='adam2').minimize(self.generator_loss, var_list=en_var)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\optimizer.py", line 413, in minimize name=name)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\optimizer.py", line 597, in apply_gradients self._create_slots(var_list)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\adam.py", line 131, in _create_slots self._zeros_slot(v, "m", self._name)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\optimizer.py", line 1156, in _zeros_slot new_slot_variable = slot_creator.create_zeros_slot(var, op_name)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\slot_creator.py", line 190, in create_zeros_slot colocate_with_primary=colocate_with_primary)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\slot_creator.py", line 164, in create_slot_with_initializer dtype)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\slot_creator.py", line 74, in _create_slot_var validate_shape=validate_shape)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 1504, in get_variable aggregation=aggregation)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 1247, in get_variable aggregation=aggregation)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 567, in get_variable aggregation=aggregation)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 519, in _true_getter aggregation=aggregation)
File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 886, in _get_single_variable "reuse=tf.AUTO_REUSE in VarScope?" % name)
ValueError: Variable arga_32/Encoder/e_dense_1_vars/weights/adam2/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=tf.AUTO_REUSE in VarScope?
I don't have any idea to solve this :/
I'm not quite sure why this is happening, but I think it may caused by the code in optimizer.py
:
self.generator_optimizer = tf.train.AdamOptimizer(learning_rate=FLAGS.discriminator_learning_rate, beta1=0.9, name='adam2').minimize(self.generator_loss, var_list=en_var)
There may have something wrong with that var_list=en_var
, the variable of arga_32/Encoder/e_dense_1_vars/weights/adam2/
does not exist and it's really not going to do, maybe you can print it en_var
.
BTW, it works well in my environment (py 3.7, tensorflow 1.12.0
), MayI ask you that the version of tensorflow?
I am using tensorflow 2.0.0. Should i downgrade it?
I am using tensorflow 2.0.0. Should i downgrade it?
Yes it must be. Tf2.0 if quite different from the previous version. You can downgrade it to any version except for 2.0 (1.12 1.13 1.14 is availiable).
I will do it and tell you if it works. Thank you :D
That's all right. Hope it works (if I'm not mistaken) : )
It worked !! Thank you man 💃
Great! : )
Hello, I also encountered this problem, how did you solve it? Thank you!
Could anyone give me the code of python3.7 version? I try to transform it but met some problems.
Could anyone give me the code of python3.7 version? I try to transform it but met some problems.
I made it. Thanks!
Traceback (most recent call last): File "/Users/linda/mywork/ARGA-master/ARGA/arga/run.py", line 18, in
runner.erun()
File "/Users/linda/mywork/ARGA-master/ARGA/arga/link_prediction.py", line 27, in erun
placeholders = get_placeholder(feas['adj'])
KeyError: 'adj'