nlpyang/structured

Error with data preprocess

zuoxiang95 opened this issue · 2 comments

Hi @nlpyang , thanks for your code.
When i was running prepare_data.py , i found an error is
"IOError: [Errno 2] No such file or directory: '../data/yelp-2013-all.pkl'"
I have downloaded the data , but it only has three files: yelp-2013.train, yelp-2013.dev and yelp-2013.test

I modify the path of yelp-2013-all.pkl, it can run successful.But i train the model ,find this error:

Traceback (most recent call last):
File "cli.py", line 45, in
tf.app.run()
File "/root/anaconda3/envs/wordseg/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "cli.py", line 42, in main
m(config)
File "/home/zuoxiang/text_classfication/structured/main.py", line 57, in run
model.get_loss()
File "/home/zuoxiang/text_classfication/structured/models.py", line 202, in get_loss
self.opt = optimizer.minimize(self.loss)
UnboundLocalError: local variable 'optimizer' referenced before assignment

I have created a PR to fix it.