Spacy loss calculation #9128
Replies: 1 comment 3 replies
-
For NER it's a little hard to find, but if you look around here you can see that it's using mean squared error of labels to calculate the loss (the mean is taken further down). The Transformer is like the tok2vec layer in that it doesn't have its own objective - the loss from downstream layers is communicated to the Transformer and reported as its loss, so it's not particularly meaningful if you only have one component. (Also note that while the loss is transmitted to the Transformer, it's not 1-to-1, so you won't see the same values for Transformer loss as your downstream component. This can be caused by the optimizer learning different moments for Transformer parameters, for example.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I was training a custom spacy NER with a transformer. It had two types of loss i.e. transformer_loss and NER_loss. Can anyone please help me on understanding how each of them is calculated? Also if you can briefly suggest the loss function that would be very much helpful..
Thanking you in advance..
Beta Was this translation helpful? Give feedback.
All reactions