Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: local variable 'path' referenced before assignment #4

Open
arisagithub opened this issue Apr 5, 2017 · 2 comments

Comments

@arisagithub
Copy link

Hello,
i have a dataset with 1572 sentences and 13 classes. i try to train this data.
here is output and error:
INFO:root:The maximum length of all sentences: 40
INFe O:root:x_train: 1271, x_dev: 142, x_test: 158
INFO:root:y_train: 1271, y_dev: 142, y_test: 158
Traceback (most recent call last):
File "train.py", line 136, in
train_cnn()
File "train.py", line 131, in train_cnn
logging.critical('Accuracy on test set is {} based on the best model {}'.format(test_accuracy, path))
UnboundLocalError: local variable 'path' referenced before assignment.

@jiegzhan
Copy link
Owner

jiegzhan commented Apr 7, 2017

"evaluate_every": 200

Your training dataset is quite small. Try a small "evaluate_every" number such as 2? or 4?

@arisagithub
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants