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

Labeled projective dependency CRF #63

Merged
merged 7 commits into from
Mar 25, 2020
Merged

Conversation

kmkurn
Copy link
Contributor

@kmkurn kmkurn commented Mar 25, 2020

This is work in progress and isn't ready to merge yet.

This seems to work for partition, but argmax and marginals don't return as I expect. Both return tensor of shape (B, N, N); I'd expect them to return (B, N, N, L) tensors instead. Any advice?

@srush
Copy link
Collaborator

srush commented Mar 25, 2020

Almost perfect. You just have to update _unconvert as well. It gets called in arrange marginals. If you could make it squeeze the last dimension as well that would keep the old code working.

@kmkurn
Copy link
Contributor Author

kmkurn commented Mar 25, 2020

I've updated _unconvert as suggested, but both argmax and marginals still have 3 dimensions :-(

UPDATE: I think I've got it.

@kmkurn kmkurn marked this pull request as ready for review March 25, 2020 04:53
@kmkurn kmkurn changed the title [WIP] Labeled projective dependency CRF Labeled projective dependency CRF Mar 25, 2020
@srush srush merged commit e76b093 into harvardnlp:master Mar 25, 2020
@srush
Copy link
Collaborator

srush commented Mar 25, 2020

Awesome. Adding

@kmkurn kmkurn deleted the labeled-proj-crf branch March 26, 2020 06:00
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

Successfully merging this pull request may close these issues.

3 participants