-
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
Alignment CRF error #106
Comments
Turns out the - charta[1][:, b, point:, 1, ind, :, :, Mid] = semiring.one_(
- charta[1][:, b, point:, 1, ind, :, :, Mid]
- )
+ # semiring.one_() was removed
+ charta[1][:, b, point:, 1, ind, :, :, Mid] = charta[1][:, b, point:, 1, ind, :, :, Mid].fill_(0) However despite this progress I still have problems when calculating the marginals using genbmm as my tensors are not cuda. |
Oh, Unfortunately alignment crf only runs on gpu, so the tests don't catch this. Are you using it? Wondering if I should just remove it until I figure out a better approach. |
I was hoping to use it. Can the tests not run on the GPU or am I missing the point? |
Yes, they should run on GPU, but they don't run automatically. If you want to fix them and check that they pass that would be great. Otherwise, I'll take a look (but likely not until next week). |
See #109. I'm not 100% sure this is what you suggested I do but it is a starting point at least. |
Looks like there is an error now on install for AlignmentCRF.
https://github.com/harvardnlp/pytorch-struct/blob/master/notebooks/CTC_with_padding.ipynb
Error:
`
~/opt/anaconda3/lib/python3.7/site-packages/torch_struct/alignment.py in dp_scan(self, log_potentials, lengths, force_grad)
98 point = (l + M) // 2
99
--> 100 charta[1][:, b, point:, 1, ind, :, :, Mid] = semiring.one(
101 charta[1][:, b, point:, 1, ind, :, :, Mid]
102 )
AttributeError: type object 'LogSemiring' has no attribute 'one_'
`
The text was updated successfully, but these errors were encountered: