carpedm20 / MemN2N-tensorflow

"End-To-End Memory Networks" in Tensorflow
http://arxiv.org/abs/1503.08895v4
MIT License
829 stars 250 forks source link

absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'nwords' #20

Open az5872 opened 6 years ago

az5872 commented 6 years ago

how to solve this?

lqsherlock commented 6 years ago

Hi , You can modify two files as follows.


in main.py:

...
#FLAGS.nwords = len(word2idx)
...
model = MemN2N(FLAGS, len(word2idx) ,sess)
...

in model.py: ...

class MemN2N(object):
    def __init__(self, config, nwords, sess):
          self.nwords = nwords

...