jiegzhan / multi-class-text-classification-cnn

Classify Kaggle Consumer Finance Complaints into 11 classes. Build the model with CNN (Convolutional Neural Network) and Word Embeddings on Tensorflow.
Apache License 2.0
426 stars 198 forks source link

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

Open cocokatta opened 6 years ago

cocokatta commented 6 years ago

Hi,

I was using your model trainer, but with considerably less data than from the given example

  1. Trying to train for 3 classes
  2. Approx. 50 sentences in the training set for each class

and what parameters should I provide in order to make a functioning/effective model.

Normally when I run with the given parameters we get an error, and so we were wondering if there was a better way to go about doing that.

Errors include:

  1. for the following paramters { "num_epochs": 1, "batch_size": 20, "num_filters": 32, "filter_sizes": "3,4,5", "embedding_dim": 50, "l2_reg_lambda": 0.0, "evaluate_every": 200, "dropout_keep_prob": 0.5 } logging.critical('Accuracy on test set is {} based on the best model {}'.format(test_accuracy, path)) UnboundLocalError: local variable 'path' referenced before assignment
jiegzhan commented 6 years ago

try smaller batch_size and evaluate_every