therne / dmn-tensorflow

Dynamic Memory Networks (https://arxiv.org/abs/1603.01417) in Tensorflow
240 stars 82 forks source link

Some error while running #2

Open chingyaoc opened 8 years ago

chingyaoc commented 8 years ago

Hi, I simply run the code by ./main.py --task 1 and error occurred.

Traceback (most recent call last):
  File "./main.py", line 7, in <module>
    from read_data import read_babi, get_max_sizes
  File "/home/james/Work/dmn-tensorflow/read_data.py", line 76
    word_table.add_vocab(*q, x["A"])    
SyntaxError: only named arguments may follow *expression

Is seems that something is wrong with data loader.

therne commented 8 years ago

Hmm... seems like a python problem. What version of python are you using?

chingyaoc commented 8 years ago

I use python 2.7. Btw in dmn_plus.py, is it proper to initialize only one gru?

therne commented 8 years ago

I haven't tested on python 2.7 since my version is 3.5. I'll test and fix on it!

What GRU are you referring?

KingAndQueen commented 8 years ago

same problem, could you give a python 2.7 version , thanks

whju commented 8 years ago

See if changing the line 76 to the following works for you:

arg = q.append(x["A"])
word_table.add_vocab(arg)