Hi, I’m learning CRF and try to implement linear chain crf myself.
A version is currently completed, but I am having some troubles. When training with my implementation, the loss would be negative with the iteration, though the inference of model can proceed normally.
In my implementation, I don’t consider the boundary of sentences. I don’t know if that causes the negative loss. What’s more, I find the most universal method to introduce boundary is adding <START> and <END> token. But in the implementation of tensorflow-addons, I find it just add left_boundary energy and right_boundary energy for the potential.
So, I have two questions:

Does the disregard of sentence boundary cause the negative loss?
Does the implementation of tf-addons is identical with adding <START> and <END> token?

It’s appreciated for your great help. Looking forward to your reply.