Created by: lcy-seso
fixes https://github.com/PaddlePaddle/Paddle/issues/4168 fixes https://github.com/PaddlePaddle/Paddle/issues/5250
Currently, this operator only runs on CPU.
- This operator has been manually tested with the old CRFLayer. Their computation results have no differences.
2. Currently, the linear chain CRF operator does not backpropagate the gradients it receives, so it can only be used at the end of the network. This can be easily fixed. - The following things still need to be optimized:
- It is better to use double in unitest for this operator. But, currently, I come into a coredump and I haven't checked it yet. I will fix this later.- It is better if some local intermediate variable is optimized to avoid frequently allocating/freeing memory.