SemGCN
SemGCN copied to clipboard
A
Hi, in my reproduce work, there is a mistake which I don't know how to solve. models/sem_gcn.py", line 49 self.nonlocal = GraphNonLocal(hid_dim, sub_sample=group_size) ^ SyntaxError: invalid syntax
Hi, in my reproduce work, there is a mistake which I don't know how to solve. models/sem_gcn.py", line 49 self.nonlocal = GraphNonLocal(hid_dim, sub_sample=group_size) ^ SyntaxError: invalid syntax
Hi @haolianxinyi ,
It seems a syntax error. Please check if you have incorrect indent or missing parentheses.
Best, Long
Thank you very much, the problem is handled.
nonlocal is identified as a python keyword here. Maybe it's better to change it to something else?
nonlocal is identified as a python keyword here. Maybe it's better to change it to something else?
Hi @LawrenceXu13467 ,
Thanks for pointing it out.
nonlocal is a keyword introduced in Python 3. This repo is developed with Python 2 by default, so it should not be a problem. But if you are upgrading to Python 3, it will be better to change it.
Best, Long
@garyzhao Hi there~
My python version is: 3.6.10 and I retype the function here. However is still not working....
it seems that it is nonLocal keywords problem.