ConvCRF
ConvCRF copied to clipboard
Prediction different in iterations
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.
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.
Isn't it softmax followed by log? Docs: https://pytorch.org/docs/master/nn.functional.html#torch.nn.functional.log_softmax