MiguelMonteiro / CRFasRNNLayer

Conditional Random Fields as Recurrent Neural Networks (Tensorflow)
MIT License
82 stars 19 forks source link

Last Softmax in CRFasRNN #7

Closed Fettpet closed 6 years ago

Fettpet commented 6 years ago

Hello, The algorithm in the CRFasRNN paper defines softmax as last operation. With your implementation the last softmax isn't applied. You need to do a softmax after the calculation of the CRFasRNN model. This is hard to read. The after CRFasRNN softmax isn't applied in crf_rnn_layer_test.

greets Sebastian

MiguelMonteiro commented 6 years ago

This was intentional, it's more flexible this way. Especially in Tensorflow where the the default loss functions are meant to work with logits as inputs instead of probability.