Commit
·
4e4ff12
1
Parent(s):
40b7109
Update README.md
Browse files
README.md
CHANGED
|
@@ -38,7 +38,7 @@ hypothesis = 'EpCAM is downregulated in breast cancer.'
|
|
| 38 |
# run through model pre-trained on MNLI
|
| 39 |
x = tokenizer.encode(premise, hypothesis, return_tensors='pt',
|
| 40 |
truncation_strategy='only_first')
|
| 41 |
-
logits = model(x
|
| 42 |
|
| 43 |
probs = logits.softmax(dim=1)
|
| 44 |
print('Probabilities for entailment, neutral, contradiction \n', np.around(probs.cpu().
|
|
|
|
| 38 |
# run through model pre-trained on MNLI
|
| 39 |
x = tokenizer.encode(premise, hypothesis, return_tensors='pt',
|
| 40 |
truncation_strategy='only_first')
|
| 41 |
+
logits = model(x)[0]
|
| 42 |
|
| 43 |
probs = logits.softmax(dim=1)
|
| 44 |
print('Probabilities for entailment, neutral, contradiction \n', np.around(probs.cpu().
|