Louis-udm / VGCN-BERT

MIT License
121 stars 35 forks source link

How to use the model for regression tasks? #9

Open mbarbouch opened 4 years ago

mbarbouch commented 4 years ago

For a regression task like STS_B, the model is rounding the values to whole integers. What is the best way to make the model consider float outputs between 0-5?

On PyTorch forum I came a thread across saying that a different loss function (nn.BCEWithLogitsLoss) should be used. I only don't know if this applies to your model as well?

Louis-udm commented 4 years ago

Hi,

I don't know STS_B, however, it's not difficult to adapt the model to other loss functions since the last layer is just a dense layer.

mbarbouch commented 4 years ago

Alright, thank you. I'll take a look...

STS-B (Semantic Textual Similarity Benchmark) is a dataset for semantic similarity between two sentences. The similarity is represented by a score in [0, 5]. (See https://www.aclweb.org/anthology/S17-2001/)