-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
got this error, please help! #9
Comments
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 File "C:\ARGA\ARGA\arga\constructor.py", line 43, in format_data File "C:\ARGA\ARGA\arga\input_data.py", line 24, in load_data File "E:\Programme\py\envs\keras-gpu\lib\encodings\cp1252.py", line 23, in decode 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. Thank you in advance |
well, it is easy to solve this problem. First I will introduce the solution below: change the code in 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 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 File "C:\ARGA\ARGA\arga\constructor.py", line 90, in get_optimizer File "C:\ARGA\ARGA\arga\optimizer.py", line 43, in init File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\optimizer.py", line 413, in minimize File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\optimizer.py", line 597, in apply_gradients File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\adam.py", line 131, in _create_slots File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\optimizer.py", line 1156, in _zeros_slot File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\slot_creator.py", line 190, in create_zeros_slot File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\slot_creator.py", line 164, in create_slot_with_initializer File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\training\slot_creator.py", line 74, in _create_slot_var File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 1504, in get_variable File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 1247, in get_variable File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 567, in get_variable File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 519, in _true_getter File "C:\Users\trahm\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\ops\variable_scope.py", line 886, in _get_single_variable 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 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 BTW, it works well in my environment ( |
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. |
That's all right. Hope it works (if I'm not mistaken) : ) |
It worked !! |
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. |
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'
The text was updated successfully, but these errors were encountered: