jiegzhan/multi-class-text-classification-cnn

UnboundLocalError: local variable 'path' referenced before assignment

cocokatta opened this issue · 1 comments

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

try smaller batch_size and evaluate_every