UKPLab / sentence-transformers

State-of-the-Art Text Embeddings
https://www.sbert.net
Apache License 2.0
15.45k stars 2.5k forks source link

on the training_nli.py of NLI training example #1152

Open lukemao opened 3 years ago

lukemao commented 3 years ago

Hi,

Thanks for providing an example of training SBERT on NLI examples.

I have a question on the example code provided training_nli.py

At line: train_loss = losses.SoftmaxLoss(model=model, sentence_embedding_dimension=model.get_sentence_embedding_dimension(), ....

Does this line automatically prepare the input to the softmax operator.

When I saw 'input' I mean the concatenated vector:

(u, v, |u-v|)

Lu.

nreimers commented 3 years ago

Yes

lukemao commented 3 years ago

Thanks Nils !