ConvCRF icon indicating copy to clipboard operation
ConvCRF copied to clipboard

Prediction different in iterations

Open prio1988 opened this issue 7 years ago • 2 comments

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.

prio1988 avatar Aug 27 '18 23:08 prio1988

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.

MarvinTeichmann avatar Sep 25 '18 10:09 MarvinTeichmann

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

umangksinha avatar Jun 21 '20 11:06 umangksinha