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

Neglogev is inf #15

Open
YanWenqiang opened this issue Nov 14, 2019 · 3 comments
Open

Neglogev is inf #15

YanWenqiang opened this issue Nov 14, 2019 · 3 comments

Comments

@YanWenqiang
Copy link

When I run your code on my own dataset, formated as e2e dataset, the train neglogev is inf. But When I run only a snippet of the full data, the result is OK. I have debug for a long time, I can't find any solution.

@swiseman
Copy link
Contributor

My guess is this is related to the constraints: if you constrain the model to not segment a particular span which is longer than the maximum span length, you won't be able to assign any probability to that span, and you'll get something like -inf.

@YanWenqiang
Copy link
Author

YanWenqiang commented Nov 14, 2019

Yeah, I set the segment length parameter L to be 10 which is longer than the previous one and the neglogev is normal. But at template extraction phase another question is arise. The RuntimeError is at infer.py Line 82 reporting that "The expanded size of the tensor (7) must match the existing size (10) at non-singleton dimension 0. Target sizes: [7, 15, 125]. Tensor sizes: [10, 1, 125]". It is interesting that only if the parameter L is bigger than 4, the error is arised. Note that the segment length in my own dataset is limited 4.

@YanWenqiang
Copy link
Author

Continue the above question. After I check the infer.py file and I am confused at line 71. if var jj iterates over L, we can't guarantee that the first dim of len_terms equals to steps_back. When I modify line 71 as

for jj in xrange(steps_back, -1, -1)

the above question disappears.

So I wonder whether var jj iterates over L or steps_back ?

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