To my understanding, some people mentioned [CLS] represent entire sentence’s embeddings. However, I noticed it may not be true.
Refer to one of the BERT’ author,
-1 means the last hidden layer. There are 12 or 24 hidden layers, so -1,-2,-3,-4 means 12,11,10,9 (for BERT-Base.) It's extracted for each…
You may refer to the following links. It include another 3 emotion classification implementation.
I put config file in a “env” folder which locates in same level of “src” folder. However, I did not put “env” into the above diagram because config file may not be a mandatory file for model API.
In most of the cases, model will serve as a API purely rather than including a complex logic. If you have to do that, may consider…