SemGCN icon indicating copy to clipboard operation
SemGCN copied to clipboard

A

Open haolianxinyi opened this issue 4 years ago • 6 comments

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

haolianxinyi avatar Apr 13 '20 13:04 haolianxinyi

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

garyzhao avatar Apr 13 '20 15:04 garyzhao

Thank you very much, the problem is handled.

haolianxinyi avatar Apr 15 '20 09:04 haolianxinyi

nonlocal is identified as a python keyword here. Maybe it's better to change it to something else?

LawrenceXu13467 avatar May 07 '20 00:05 LawrenceXu13467

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 avatar May 07 '20 01:05 garyzhao

@garyzhao Hi there~

My python version is: 3.6.10 and I retype the function here. However is still not working....

jellyfish1456 avatar Aug 06 '20 03:08 jellyfish1456

it seems that it is nonLocal keywords problem.

jellyfish1456 avatar Aug 06 '20 03:08 jellyfish1456