CNN-yelp-challenge-2016-sentiment-classification
CNN-yelp-challenge-2016-sentiment-classification copied to clipboard
ValueError: too many values to unpack
Hi Sir,
I am running the code to train multi class and im getting the error too many values to unpack using the yelp dataset.
(reviews_words_index, labels) = pickle.load(open("review_sents_1859888.pkl", 'rb')) ValueError: too many values to unpack.
Hello Rakashi, This file (review_sents_1859888.pkl) only contains the matrix representation of the words (refer to this IPython notebook: https://github.com/haoopeng/CNN-yelp-challenge-2016-sentiment-classification/blob/master/word2vec_model.ipynb).
I guess you got this error when running train_multi_class.ipynb
.
Then the code should be:
(reviews_words_index, labels) = pickle.load(open("399850by50reviews_words_index.pkl", 'rb'))
Also remember to save the pickle file first with this line:
pickle.dump((reviews_words_index, labels), open("399850by50reviews_words_index.pkl", 'wb'))