-
Notifications
You must be signed in to change notification settings - Fork 725
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
Training an RNN to classify sequences using just the last LSTM output #325
base: master
Are you sure you want to change the base?
Training an RNN to classify sequences using just the last LSTM output #325
Conversation
…the very end of training.
Hi aidan - just got back to town after a couple weeks abroad plus some insane paper deadline - looking forward to reviewing this properly. Thanks for the PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of loss is being used here -loss = nd.mean((out[out.shape[0]-1] - 2)**2)
? Would be great to mention that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the most part. Minor comments!
" if len(s) > min_len and len(s) < max_len:\n", | ||
" yield s\n", | ||
" \n", | ||
" # Run through all the novels and grab all the sentences in the books and grab all the sentences\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean here? @aidan-plenert-macdonald
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just sentences out as series of characters
I did this as a demo for a particular project. I can polish it up if you want it.
You basically just run an LSTM on every sequence, take the last output for each sequence and the push that through a neural net.
There are 2 demos training on generated data and then one classifying sentences as Spanish or English. The language one is tested using entirely different novels.