-
Notifications
You must be signed in to change notification settings - Fork 826
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
set sentence max length automatically #28
Comments
cool, feel free to send a pull request! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are using a dataset with sentences longer than 65 words, you have to set the the max_l variable manually. You can fix this little issue by replacing the second last line in process_data.py with:
cPickle.dump([revs, W, W2, word_idx_map, vocab, max_l], open("mr.p", "wb"))
and in conv_net_sentence.py after loading the pickled file:
revs, W, W2, word_idx_map, vocab, max_l = x[0], x[1], x[2], x[3], x[4], x[5]
Now you only have to replace the make_idx_data_cv function call by:
make_idx_data_cv(revs, word_idx_map, i, max_l=max_l, k=300, filter_h=5)
It drove me crazy finding that the max sentence length limitation was the problem for the error
The text was updated successfully, but these errors were encountered: