Upload modelling_xlm_roberta.py
Browse files- modelling_xlm_roberta.py +3 -2
modelling_xlm_roberta.py
CHANGED
@@ -1456,8 +1456,9 @@ class XLMRobertaForEstimation(XLMRobertaPreTrainedModel):
|
|
1456 |
return_dict=return_dict,
|
1457 |
)
|
1458 |
|
1459 |
-
|
1460 |
-
|
|
|
1461 |
|
1462 |
loss = None
|
1463 |
if labels is not None:
|
|
|
1456 |
return_dict=return_dict,
|
1457 |
)
|
1458 |
|
1459 |
+
CLS_tok = outputs[0][:, 0, :] # for some reason at sentence level we take the first token score cf Comet
|
1460 |
+
logits = self.estimator(CLS_tok)
|
1461 |
+
reshaped_logits = logits #.view(-1, num_choices)
|
1462 |
|
1463 |
loss = None
|
1464 |
if labels is not None:
|