Commit
·
99338c8
1
Parent(s):
39d1084
Update README.md
Browse files
README.md
CHANGED
@@ -37,10 +37,10 @@ docs_input = tokenizer(documents , padding="max_length", return_tensors="pt")
|
|
37 |
# document input shape should be [batch_size, num_docs, seq_len]
|
38 |
# so if only input one sample of documents, add one dim by unsqueeze(0)
|
39 |
output = model(
|
40 |
-
document_input_ids=docs_input.input_ids.unsqueeze(0),
|
41 |
-
document_attention_mask=docs_input.attention_mask.unsqueeze(0),
|
42 |
-
question_input_ids=question_input.input_ids,
|
43 |
-
question_attention_mask=question_input.attention_mask
|
44 |
)
|
45 |
print("reranking scores: ", output.logits)
|
46 |
```
|
|
|
37 |
# document input shape should be [batch_size, num_docs, seq_len]
|
38 |
# so if only input one sample of documents, add one dim by unsqueeze(0)
|
39 |
output = model(
|
40 |
+
document_input_ids=docs_input.input_ids.unsqueeze(0),
|
41 |
+
document_attention_mask=docs_input.attention_mask.unsqueeze(0),
|
42 |
+
question_input_ids=question_input.input_ids,
|
43 |
+
question_attention_mask=question_input.attention_mask
|
44 |
)
|
45 |
print("reranking scores: ", output.logits)
|
46 |
```
|