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

Prediction different in iterations #9

Open
prio1988 opened this issue Aug 27, 2018 · 2 comments
Open

Prediction different in iterations #9

prio1988 opened this issue Aug 27, 2018 · 2 comments

Comments

@prio1988
Copy link

Can you someone explain why the prediction used to compute the message at the first iteration is the output from logsoftmax and for the other iterations is softmax? In the inference function.

@MarvinTeichmann
Copy link
Owner

This is similar to #11. I use logsoftmax in the first iteration, because the original FullCRF implemented uses log on the data (followed by softmax). Logsoftmax does the same but numerical more stable.

In all further iteration only softmax is applied in FullCRF, since the data is already in "log" space.

@umangksinha
Copy link

Isn't it softmax followed by log?
Docs: https://pytorch.org/docs/master/nn.functional.html#torch.nn.functional.log_softmax

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

3 participants