-
Notifications
You must be signed in to change notification settings - Fork 93
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
1st order cky implementation #83
Conversation
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.
This looks great! Very excited to add.
Couple questions:
- Reshape always worries me. Can those be views?
- Repeat is almost never necessary. What operators is failing there?
- I would prefer the sr.sum be replace with a view and then a single sum.
Were you able to run any tests? I know travis is broken (I need to move to github), but it would be great to have at least one test. For other algorithms I enumerate all examples and score. Can you try that?
Great, excited to contribute! Re: your questions
Thanks for the feedback, |
I can help with testing. Yes, all the algorithms in torch struct test that the enumeration has the same marginals. Its helped catch a ton of bugs.
|
Cool, help with the testing would nice but I can also take a crack at it later. When I get to it I'll also incorporate the suggested changes, (and will try it out with view). |
Hey sorry, I flaked on helping out here. Send me an email if you want to work on it more. I'm going to do some repo maintenance this week. |
Hey, no worries same here. Will send an email |
included in #93 |
Hi,
I'd like to contribute this implementation of a first-order cky-style crf with anchored rule potentials:$\phi[i,j,k,A,B,C] := \phi(A_{i,j} \rightarrow B_{i,k}, C{k+1,j})$ .
I also added code to the
_Struct
class that allows calculating marginals even if input tensors don't require a gradient (i.e., aftermodel.eval()
)Please let me know if you'd like to see any changes.
Thanks,
Tom