Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
44c340f4
Unverified
Commit
44c340f4
authored
Dec 15, 2020
by
Yoshitomo Matsubara
Committed by
GitHub
Dec 15, 2020
Browse files
fix a bug in eval_batch_retrieval (#9089)
parent
c19d0462
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/research_projects/rag/eval_rag.py
examples/research_projects/rag/eval_rag.py
+1
-1
No files found.
examples/research_projects/rag/eval_rag.py
View file @
44c340f4
...
@@ -96,7 +96,7 @@ def evaluate_batch_retrieval(args, rag_model, questions):
...
@@ -96,7 +96,7 @@ def evaluate_batch_retrieval(args, rag_model, questions):
)[
"input_ids"
].
to
(
args
.
device
)
)[
"input_ids"
].
to
(
args
.
device
)
question_enc_outputs
=
rag_model
.
rag
.
question_encoder
(
retriever_input_ids
)
question_enc_outputs
=
rag_model
.
rag
.
question_encoder
(
retriever_input_ids
)
question_enc_pool_output
=
question_enc_outputs
.
pooler_output
question_enc_pool_output
=
question_enc_outputs
[
0
]
result
=
rag_model
.
retriever
(
result
=
rag_model
.
retriever
(
retriever_input_ids
,
retriever_input_ids
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment