Skip to content
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

Is the one-prediction-per-sequence variant still forthcoming? #7

Open
joecomerisnotavailable opened this issue Feb 26, 2019 · 1 comment

Comments

@joecomerisnotavailable
Copy link

Or, would it be possible to give a rough outline of where the major changes would need to be made in the current code to convert it?

Thanks

@mp2893
Copy link
Owner

mp2893 commented Feb 27, 2019

Since Theano is no longer maintained, I don't plan to add anything to this repo.
But changing the current code to one-pred-per-seq version shouldn't be that hard.

Below are some things that need to be done in gram.py:

  • line 81-98: use line 56-74 of rnn_predict.
  • line 119: y should be either a matrix (in case of multi-class prediction) or a vector (in case of binary prediction), not a 3D tensor, because you make only one prediction per sequence.
  • line 121: you don't need lengths anymore. Be sure to delete lengths in everywhere in the code.
    -line 135-147: see line 89-98 of rnn_predict.
  • line 149, load_data(): Load an appropriate label file.
  • line 224-240: you don't need a 3d tensor y. Prepare an appropriate y.

Basically those are the high-level directions. rnn_predict should give you a pretty good idea how to modify gram.py for binary prediction.

Best,
Ed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants