Conversation
srush
left a comment
There was a problem hiding this comment.
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
_Structclass 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